Click here to Skip to main content
16,006,845 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCreating a counter [modified] Pin
Harold_Wishes25-Jul-06 17:49
Harold_Wishes25-Jul-06 17:49 
QuestionHow do I display a blank Date/Time field? Pin
LarryCar25-Jul-06 16:30
LarryCar25-Jul-06 16:30 
AnswerRe: How do I display a blank Date/Time field? Pin
ChandraRam25-Jul-06 18:59
ChandraRam25-Jul-06 18:59 
QuestionListeners in VB.NET Pin
Joshua Boyle25-Jul-06 10:09
Joshua Boyle25-Jul-06 10:09 
AnswerRe: Listeners in VB.NET Pin
mr_lasseter25-Jul-06 12:54
mr_lasseter25-Jul-06 12:54 
QuestionStrange Error while inserting records Pin
mike_eps25-Jul-06 9:19
mike_eps25-Jul-06 9:19 
AnswerRe: Strange Error while inserting records Pin
mike_eps26-Jul-06 4:23
mike_eps26-Jul-06 4:23 
QuestionUpdating Primary Key after Record Deletion (Access 2003) Pin
Joshua Boyle25-Jul-06 8:49
Joshua Boyle25-Jul-06 8:49 
Hello!

I posted a bit ago with a question about a syntax error in a seemingly-flawless SQL string but now I'm back with what is hopefully a simpler problem:

In my program, record (tuples) in a database are represented as items in a list box. The user can select any item they wish from the list box and have all the information about that entry readily displayed to the form - this part is working just fine.

What isn't working is record deletion. Although the deletion itself is working (in that it does, in fact, delete the selected record), it does not update the primary key (an ID # in this case) at all thus after deleting a few random records I am left with a rather unorderly database.

I have tried manually updating the ID via an SQL UPDATE statement as follows:

oleCommand.CommandText = "UPDATE tblEvents (ID) VALUES (" + nCount + ")"

Where:

oleCommand = my OleDbCommand object
tblEvents = my table within the database I'm using
ID = the primary key of this table
nCount = a counter variable dually-used to step through a loop while setting the ID for each record.

Please let me know if oyu have any ideas and thank you in advance!
AnswerRe: Updating Primary Key after Record Deletion (Access 2003) Pin
ChandraRam25-Jul-06 9:03
ChandraRam25-Jul-06 9:03 
GeneralRe: Updating Primary Key after Record Deletion (Access 2003) Pin
Joshua Boyle25-Jul-06 10:07
Joshua Boyle25-Jul-06 10:07 
GeneralRe: Updating Primary Key after Record Deletion (Access 2003) Pin
ChandraRam25-Jul-06 10:12
ChandraRam25-Jul-06 10:12 
GeneralRe: Updating Primary Key after Record Deletion (Access 2003) [modified] Pin
Joshua Boyle25-Jul-06 10:32
Joshua Boyle25-Jul-06 10:32 
GeneralRe: Updating Primary Key after Record Deletion (Access 2003) Pin
ChandraRam25-Jul-06 18:40
ChandraRam25-Jul-06 18:40 
Questionpopulating a dropdown list from an arraylist Pin
ssbelfast25-Jul-06 8:46
ssbelfast25-Jul-06 8:46 
AnswerRe: populating a dropdown list from an arraylist Pin
mtone25-Jul-06 9:25
mtone25-Jul-06 9:25 
QuestionHow to consume datagrid events Pin
_Chosen25-Jul-06 8:41
_Chosen25-Jul-06 8:41 
Questionwrite directly to disk drive Pin
cesur13325-Jul-06 5:00
cesur13325-Jul-06 5:00 
Questionsaving a file using vb6 Pin
yaserhamdy200625-Jul-06 1:58
yaserhamdy200625-Jul-06 1:58 
QuestionColumn Header of Datagrid Pin
Girish48125-Jul-06 1:41
Girish48125-Jul-06 1:41 
AnswerRe: Column Header of Datagrid Pin
_Chosen25-Jul-06 8:52
_Chosen25-Jul-06 8:52 
AnswerRe: Column Header of Datagrid Pin
mr_lasseter25-Jul-06 9:49
mr_lasseter25-Jul-06 9:49 
QuestionData grid Pin
_Chosen25-Jul-06 1:25
_Chosen25-Jul-06 1:25 
Questionimplement different file formats in VB.net Pin
divyaswati25-Jul-06 0:07
divyaswati25-Jul-06 0:07 
AnswerRe: implement different file formats in VB.net Pin
Colin Angus Mackay25-Jul-06 4:02
Colin Angus Mackay25-Jul-06 4:02 
GeneralRe: implement different file formats in VB.net Pin
Girish48125-Jul-06 17:48
Girish48125-Jul-06 17:48 

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.