Click here to Skip to main content
15,905,028 members
Home / Discussions / Database
   

Database

 
GeneralRe: Table Names Of a MS Access Database Pin
Thea Burger12-Feb-04 4:01
Thea Burger12-Feb-04 4:01 
GeneralRe: Table Names Of a MS Access Database Pin
FASTian17-Mar-04 20:11
FASTian17-Mar-04 20:11 
GeneralRe: Table Names Of a MS Access Database Pin
Thea Burger18-Mar-04 19:49
Thea Burger18-Mar-04 19:49 
GeneralStored procedure question Pin
LasVegasGuy10-Feb-04 8:20
LasVegasGuy10-Feb-04 8:20 
GeneralRe: Stored procedure question Pin
Bill Dean10-Feb-04 9:26
Bill Dean10-Feb-04 9:26 
GeneralRe: Stored procedure question Pin
Mazdak10-Feb-04 9:28
Mazdak10-Feb-04 9:28 
GeneralRe: Stored procedure question Pin
Husein12-Feb-04 5:45
Husein12-Feb-04 5:45 
GeneralBrick Wall!! Pin
Kwai Cheng Kane10-Feb-04 6:04
Kwai Cheng Kane10-Feb-04 6:04 
I am writing a C#/.NET program for SQL Server which performs a bulk move of data from one database to another. This is intended to be a utility end users of our product can use to perform routine maintenance on the database and will alao have options to perform summarization on the data in the alternate database after it has been moved. The program dynamically builds an INSERT and a DELETE command and issues them to the database using the 'ExecuteNonQuery()' command. If I use the Query Analyzer to test the INSERT/DELETE commands, they complete without error.

The problem: The 'ExecuteNonQuery()' of the ODBC classes only returns an 'int' representing the number of rows effected. However, the number of records copied is often too large to fit within an integer. This, in turn, causes a '-1' to be returned instead. A careful examination of the data reveals that the INSERT actually did copy the data (most of the time), but the '-1' causes the program to not issue the DELETE command, because it uses the return value of 'ExecuteNonQuery()' as another indicator of an error condition.

This is unreliable and inconsistent (unfortunately the only consistency Microsoft follows is that they are consistently inconsistent) and can lead to duplicate information. Is there a way around this??? Is there a way to determine the TRUE number of records effected by the call??? Is there another, more reliable, way of determining whether the command completed successfully???

NOTE: my exception handler is not getting triggered in this case, nor does it look like the connection status is changing (I was assuming possibly a timeout was happening) since my connection status handler is not getting called either.

GeneralRe: Brick Wall!! Pin
Bill Dean10-Feb-04 8:09
Bill Dean10-Feb-04 8:09 
GeneralRe: Brick Wall!! Pin
Bill Dean10-Feb-04 8:12
Bill Dean10-Feb-04 8:12 
GeneralRe: Brick Wall!! Pin
10-Feb-04 10:13
suss10-Feb-04 10:13 
GeneralRe: Brick Wall!! Pin
Kwai Cheng Kane10-Feb-04 9:06
Kwai Cheng Kane10-Feb-04 9:06 
GeneralRe: Brick Wall!! Pin
Bill Dean10-Feb-04 10:28
Bill Dean10-Feb-04 10:28 
GeneralRe: Brick Wall!! Pin
Kwai Cheng Kane10-Feb-04 10:51
Kwai Cheng Kane10-Feb-04 10:51 
GeneralRe: Brick Wall!! Pin
Kwai Cheng Kane10-Feb-04 11:34
Kwai Cheng Kane10-Feb-04 11:34 
GeneralRe: Brick Wall!! Pin
Kwai Cheng Kane10-Feb-04 12:45
Kwai Cheng Kane10-Feb-04 12:45 
QuestionHow to replace a string while retrieving data from an access database in ASP. NET Pin
mmxguy10-Feb-04 3:05
mmxguy10-Feb-04 3:05 
AnswerRe: How to replace a string while retrieving data from an access database in ASP. NET Pin
michanne11-Feb-04 9:47
michanne11-Feb-04 9:47 
GeneralDAO query by array long[] numbers Pin
arbrsoft9-Feb-04 0:14
arbrsoft9-Feb-04 0:14 
GeneralRe: DAO query by array long[] numbers Pin
Steve S10-Feb-04 6:18
Steve S10-Feb-04 6:18 
QuestionMultiple Header DataGrid....anyone?? Pin
srt76-Feb-04 9:49
srt76-Feb-04 9:49 
AnswerRe: Multiple Header DataGrid....anyone?? Pin
-Dr_X-7-Feb-04 21:05
-Dr_X-7-Feb-04 21:05 
AnswerRe: Multiple Header DataGrid....anyone?? Pin
Marcie Jones10-Feb-04 6:46
Marcie Jones10-Feb-04 6:46 
GeneralSQL Server problem Pin
srt76-Feb-04 9:47
srt76-Feb-04 9:47 
GeneralRe: SQL Server problem Pin
Hesham Amin8-Feb-04 8:40
Hesham Amin8-Feb-04 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.