Click here to Skip to main content
15,910,234 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: trouble with login Pin
Dave Kreskowiak30-May-07 7:51
mveDave Kreskowiak30-May-07 7:51 
GeneralRe: trouble with login Pin
Colin Angus Mackay30-May-07 8:13
Colin Angus Mackay30-May-07 8:13 
QuestionHow to pass a string from a vb.net dll to C++ dll Pin
retZ29-May-07 9:24
retZ29-May-07 9:24 
AnswerRe: How to pass a string from a vb.net dll to C++ dll Pin
Dave Kreskowiak29-May-07 9:49
mveDave Kreskowiak29-May-07 9:49 
GeneralRe: How to pass a string from a vb.net dll to C++ dll Pin
retZ29-May-07 11:28
retZ29-May-07 11:28 
QuestionDataSet auto increment problem Pin
Quecumber25629-May-07 7:54
Quecumber25629-May-07 7:54 
AnswerRe: DataSet auto increment problem Pin
Dave Kreskowiak29-May-07 8:22
mveDave Kreskowiak29-May-07 8:22 
GeneralRe: DataSet auto increment problem Pin
Quecumber25629-May-07 9:02
Quecumber25629-May-07 9:02 
Dave,
I sincerely thank you for your help.

I hope I can explain my problem accurately enough so you can at least get an understanding of what I'm trying to do.

I think I mentioned in a previous post that I have a data entry form that has four text boxes data bound to the BindingSource control. The BingingNavigator control is bound to the BindingSource control to allow the user the ability to navigate through the dataset while it is stored in memory. I designed the form so I can edit existing records as well as add new ones during a session.

The dataset's schema is derived from the table the Dataset is recovering the information from. So in theory I have all four columns ID, Ordinal, Code and name in the dataset.

I'm using the SqlCommandBuilder to automatically generate the add and update queries to update the Database table. Edited records need the ID assigned from the database table before any changes made to them can be written to the database.

The new records need to be distingushed from the existing records by setting the ID column in the dataset as a negitively incrementing number. I got this idea from Microsoft MSDN.

So in theory if I edit an existing record and then add a new one. The DataSet knows which record was edited by its ID number while the new record is seperately distinguished by its negitive increment.

Unless you set the dataset's autoincrement column to start a -1 and step by -1 whenever you add a new record to the dataset it will start a 1 and if you already have a record with the ID of 1 that record will be updated with the new record's data. It thinks you are editing record number one, not adding a new one.

Does this help?

Quecumber256
GeneralRe: DataSet auto increment problem Pin
Dave Kreskowiak29-May-07 9:44
mveDave Kreskowiak29-May-07 9:44 
GeneralRe: DataSet auto increment problem Pin
Quecumber25629-May-07 10:28
Quecumber25629-May-07 10:28 
GeneralRe: DataSet auto increment problem Pin
Dave Kreskowiak29-May-07 10:56
mveDave Kreskowiak29-May-07 10:56 
AnswerRe: DataSet auto increment problem Pin
kubben29-May-07 8:31
kubben29-May-07 8:31 
GeneralRe: DataSet auto increment problem Pin
Quecumber25629-May-07 9:31
Quecumber25629-May-07 9:31 
GeneralRe: DataSet auto increment problem Pin
kubben29-May-07 14:47
kubben29-May-07 14:47 
Questioninsert listbox items into database Pin
jds120729-May-07 7:49
jds120729-May-07 7:49 
AnswerRe: insert listbox items into database Pin
Dave Sexton29-May-07 8:05
Dave Sexton29-May-07 8:05 
GeneralRe: insert listbox items into database Pin
jds120729-May-07 8:30
jds120729-May-07 8:30 
GeneralRe: insert listbox items into database Pin
Dave Sexton29-May-07 22:04
Dave Sexton29-May-07 22:04 
Questionhow to show video properties Pin
somchoto29-May-07 7:43
somchoto29-May-07 7:43 
Questionsearch for files Pin
jds120729-May-07 4:20
jds120729-May-07 4:20 
QuestionCallByName Pin
advansis29-May-07 4:11
advansis29-May-07 4:11 
AnswerRe: CallByName Pin
Dave Kreskowiak29-May-07 6:56
mveDave Kreskowiak29-May-07 6:56 
AnswerRe: CallByName Pin
Ian Shlasko29-May-07 11:06
Ian Shlasko29-May-07 11:06 
GeneralRe: CallByName Pin
Dave Kreskowiak29-May-07 13:23
mveDave Kreskowiak29-May-07 13:23 
QuestionWhat is the conversion between postscript points to em? Pin
Marcus J. Smith29-May-07 2:00
professionalMarcus J. Smith29-May-07 2:00 

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.