Tim Greenwood's Q&A profile
SQL Server getting primary key out of insert into statement
Is there a way to get the primary key that is causing a primary key violation when inserting via a insert into with a select statement. This violation is being caught using a try/catch statement. Is there anyway, short of doing yourself via brute force coding, to get what the values are that are causing the error. Basically, I'm doing: begin try insert into TableA select col1, col2, col3 from TableB end try begin cat ...Show All
Visual C++ Using classes from dynamically linked DLL
I am attempting to use classes that are defined in my custom written DLLs. I am dynamically loading the DLLs using LoadLibrary. I already know how to access functions using GetProcAddress. Is it possible to do something similar for classes No! You can not use class exports via this way with LoadLibrary. A simple approach is to create interfaces like COM interfaces and return only pointers to those interface ...Show All
Visual Basic Visual Basic 2005 PopUpMenu
Hi All, I am migrating to VB2005 Express from VB6. My learning curve has, at best, become a circle at points. Luckily I have managed to figure out 95% of my issues & this is just my 2nd question I need to ask. In VB6, we had a command called "PopUpMenu (Object)" In trying to upgrade my VB6 projects, VB2005 has a fit over that command. What is the VB2005 Express equivilant to the "PopUpMenu" Many of my VB6 project ...Show All
Visual Studio Express Editions MSAccess Database coding, OpenDatabase
Hi, I use to be quite good using recordsets and so to get to my databases. Any samples somewhere how to do the following it in vb2005: dim dbPictures As Database dim rsPictures As Recordset Set dbPictures = Workspaces(0).OpenDatabase(dbTxt) Sql2 = "Select * from Pictures order by id" Set rsPictures = dbPictures.OpenRecordset(Sql2, dbOpenDynaset) with rsPictures while not .eof .movenext wend end with rspic ...Show All
Visual C++ Flaw in C++ 2005 compiler?
After setting a ref type = nullptr, I should not be able to reference the object, but this is not the case. Even after GC::Collect, the object is still there. What on earth is going on #pragma once using namespace System; ref class Managed { public: Managed(); ~Managed(); !Managed(); void Write(); }; #include "stdafx.h" #include "Managed.h" Managed::Managed() { } Managed::~Managed() ...Show All
Visual Studio Express Editions Difficulty adding a parameter to a querry
I am using two MS Access tables in my data source when I create a querry with a literal string everything works fine i.e. Select MyTable * from MyTable where (MyTable.Description Like '%' + 'Anything' + '%' I get the proper results When trying to use a user input field inside the query it doesnt work i.e. Select MyTable * from MyTable where (MyTable.Description Like '%' + @Description + '%' I get an unable ...Show All
SQL Server data not flowing out of flat file source
my package has a flat file source that should be extracting data from a text file passing the data to the next component in the data flow. the package validates fine, but the data isn't flowing. however, i see the data in the source component. i added a data viewer between the source and the next component to see if any data flowed and saw no data. can someone suggest how i should go about trying to debug this thanks. Could you give more ...Show All
Windows Forms Clipboard Screenshots
Hello, I'm looking to use the clipboard in my application. I see it can load images and text, and I was curious if it can load the currently present screen. Essentially, what I want to do is if I copy a control like the datagrid, do a screenshot. Is that feasible/possible Thanks. I tried this: Private Sub MainForm_KeyUp( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventAr ...Show All
SQL Server Creating report based on parent-child dimension
Hi I have a problem to create a report based on a parent child-dimension When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down. Anyone an idea to solve this. Does anyone have an example to create a report based on a parent-child dimensions Thx ...Show All
Visual Studio Visual SourceSafe (Internet) is slow as hell...why/what can I do?
So we have 4 people attempting to access VSS via the Internet plug-in, and it is slow as hell. Doing a get on the solution is about 2 to 3 times slower than SourceOffsite for more than one of these guys ... (and that puts it basically at the same speed as VSS over LAN...and yes we checked, they are running the Internet plug-in). The others are slower than SourceOffsite but not as bad as describe above (but it is inconsistent....and this is compa ...Show All
Visual Studio Team System uniqe calls per data row
Hi, I am runing a loadtest that containe one web test with 3 calls in it. first call is for login with a user id. second for status refresh and 3rd with one acction to add transaction. the server is doing the transaction B2B to another sever based on the login guid. my problem is , when I start the load test , I think that more then one user is using the same data row from the DB with the user id for the login action. so bascly only that last on ...Show All
Software Development for Windows Vista Error adding a custom activity to a workflow
I defined a new custom (composite) activity as part of a workflow activity library. The library project compiles fine. From within my sequential workflow project, I add this activity to a workflow by dragging it from the toolbox in the designer. I define the required parameters in the workflow that the above activity expects. However I get following error while compiling the workflow project. "error 279: Could not create activity of type 'Work ...Show All
Visual C# Windows Service
I created a Windows Service but when I used the installutil to install it I get this error: Service cannot be started. The service process could not connect to the service controller I created a new project in VS2005 and selected a Window Service. I added a Service Installer and that is all. Do i need to add a Service Controller ...Show All
Software Development for Windows Vista hosting designer, deactivate "Views"
HOL 10 demonstrates hosting a designer, which is perfect. Now if one develops a designer for the end-end-user which is probably not a programmer, all the stuff has to be a little bit simpler. So custom activities with meaningful names and so on, which the user can just drag and drop into the sequential workflow designer and connect them somehow to create "his" workflow. So far so good... What I want to get rid of is the switch to &q ...Show All
Visual Studio Team System removing autogenerated solution files from source control
Not sure which is the best forum for this question. I'm trying to find a way to prevent certain files (.vsmdi and .testrunconfig to be exact) from being stored in source control. I want the solution (.sln) and projects, etc. to be in source control, but I don't want the vsmdi and testrunconfig files checked in and out everytime someone makes a change on their local machine. Here's the user scenario that's causing me problems: - user A gets ...Show All
