Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC.Net Question

Status
Not open for further replies.

Tigger9969

Programmer
Nov 27, 2001
7
CA
I'm fairly new to VB.Net and am developing a database app.

Here's my problem. I have lots of books that tell me how to do things like update datasets with dataadapters,etc. But none of them show how to do it with the odbc data provider. So far I have a windows form, with my data showing in the text boxes. I do not have anything binded. I have my update statemnet built properly with my 2 parameters. When I click my save button I have this code
With dvOperator(Me.BindingContext(dvOperator).Position)
.Item("ID") = txtOperatorID.Text
.Item("Operators") = txtOperator.Text

End With
daOperator.Update(dsDataSet)


This doesn't work on first click, but if I update, then move to another record, come back to hit update a couple times, I get an SQL Error saying COUNT field incorrect of syntax error, but the data finally does update.

So what I'm asking, cause I'm having a lot of trouble finding good examples on what's the best way to do this with ODBC.net, what would be the easiest way to do this. I would use the regualar SQL Server Provider if someone could tell a way when I package it, to set up the connection string so that it could be set during install.

Any suggestions would be greatly appreciated or any good sample apps.

Tigger9969
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top