Click here to Skip to main content
15,887,585 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Activate a Textbox in a other Program Pin
Dave Herren26-May-07 3:11
Dave Herren26-May-07 3:11 
GeneralRe: Activate a Textbox in a other Program Pin
Dave Kreskowiak26-May-07 6:18
mveDave Kreskowiak26-May-07 6:18 
AnswerRe: Activate a Textbox in a other Program Pin
Dave Herren26-May-07 3:14
Dave Herren26-May-07 3:14 
QuestionHow can I have my program link to MyApp.msi on my website? Pin
furjaw21-May-07 7:44
furjaw21-May-07 7:44 
AnswerRe: How can I have my program link to MyApp.msi on my website? Pin
Dave Kreskowiak21-May-07 16:08
mveDave Kreskowiak21-May-07 16:08 
GeneralRe: How can I have my program link to MyApp.msi on my website? Pin
furjaw21-May-07 19:29
furjaw21-May-07 19:29 
GeneralRe: How can I have my program link to MyApp.msi on my website? Pin
Dave Kreskowiak22-May-07 11:59
mveDave Kreskowiak22-May-07 11:59 
QuestionPersistant DataSet data entry problem Pin
Quecumber25621-May-07 5:41
Quecumber25621-May-07 5:41 
Hi Everyone:
This problem has been plaguing me for three days, and I can’t for the life of me find a logical reason why this problem occurs.

My problem occurs when I try to write data into a dataset that contains nothing more than the table schema.

This subroutine is supposed to write a new record into the dataset.

Private Sub New_Bindings(ByVal intOrdinal As Integer, _
ByVal strCode As String, _
ByVal strName As String)

tblBindings = MyDataSet.Tables("tblBindings")
drCurrent = tblBindings.NewRow()
drCurrent("Ordinal") = intOrdinal
drCurrent("BindingCode") = strCode
drCurrent("BindingName") = strName
tblBindings.Rows.Add(drCurrent)
End Sub

I write new data into the dataset when this subroutine is activated. It is activated when the Private Sub BindingNavigatorAddNewItem_Click event is triggered: The AddNew Button on the BindingNavigator control on the form.

Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click
Call New_Bindings(1, "SDLS", "Saddle-stitch")
Call New_Bindings(2, "SPRL", "Spiral Bound")
Call New_Bindings(3, "STUL", "Staple Upper Left")
Call New_Bindings(4, "STUR", "Staple Upper Right")
Call New_Bindings(5, "ST2L", "Two Staples on left side")
End Sub

The dataset’s data should read like this:

BindingID – 1
Ordinal – 1
Code – SDLS
Name – Saddle-stitch

BindingID – 2
Ordinal – 2
Code – SPRL
Name – Spiral Bound

BindingID – 3
Ordinal – 3
Code – STUL
Name – Staple Upper Left

BindingID – 4
Ordinal – 4
Code – STUP
Name – Staple Upper Right

BindingID – 5
Ordinal – 5
Code – ST2l
Name – Two Staples on Left Side

What I am actually getting is:

BindingID – 0
Ordinal – 1
Code – SDLS
Name – Saddle-stitch

BindingID – 1
Ordinal – 2
Code – SPRL
Name – Spiral Bound

BindingID – 2
Ordinal – 3
Code – STUL
Name – Staple Upper Left

BindingID – 3
Ordinal – 4
Code – STUP
Name – Staple Upper Right

BindingID – 4
Ordinal – 5
Code – ST2l
Name – Two Staples on Left Side

For some reason when the first record is written out to the dataset the auto increment field (BindingID) is not incremented to one when the record is written. It has an ID of “0” which logically can’t happen when the column has been defined to be an auto increment column starting at one and incrementing by one every time a new record is added.

Can anyone tell me why this is happening and what I need to do to correct it?

Thanks,


Quecumber256
AnswerRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 6:17
professionalMarcus J. Smith21-May-07 6:17 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 7:06
Quecumber25621-May-07 7:06 
GeneralRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 7:35
professionalMarcus J. Smith21-May-07 7:35 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 8:08
Quecumber25621-May-07 8:08 
GeneralRe: Persistant DataSet data entry problem Pin
Marcus J. Smith21-May-07 8:28
professionalMarcus J. Smith21-May-07 8:28 
GeneralRe: Persistant DataSet data entry problem Pin
Quecumber25621-May-07 9:21
Quecumber25621-May-07 9:21 
QuestionDeath by obfuscation! Pin
Rich Leyshon21-May-07 5:28
Rich Leyshon21-May-07 5:28 
AnswerRe: Death by obfuscation! Pin
sthotakura21-May-07 11:02
sthotakura21-May-07 11:02 
GeneralRe: Death by obfuscation! Pin
Rich Leyshon21-May-07 11:10
Rich Leyshon21-May-07 11:10 
QuestionSQL UPDATE Stored Procedure in VB Not Working Pin
tommyfs21-May-07 4:44
tommyfs21-May-07 4:44 
AnswerRe: SQL UPDATE Stored Procedure in VB Not Working Pin
Dave Herren21-May-07 5:36
Dave Herren21-May-07 5:36 
AnswerRe: SQL UPDATE Stored Procedure in VB Not Working Pin
tommyfs24-May-07 13:18
tommyfs24-May-07 13:18 
Questionhow to find out rowindex in datagrid's drop-event? Pin
Smithers-Jones21-May-07 4:08
Smithers-Jones21-May-07 4:08 
AnswerRe: how to find out rowindex in datagrid's drop-event? Pin
Smithers-Jones21-May-07 21:58
Smithers-Jones21-May-07 21:58 
QuestionDate Format question Pin
No-e21-May-07 3:42
No-e21-May-07 3:42 
AnswerRe: Date Format question Pin
No-e21-May-07 4:02
No-e21-May-07 4:02 
Questionwats wrong in this Pin
balakpn21-May-07 3:42
balakpn21-May-07 3:42 

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.