i'm having a problem doing this, and i think i might be headed in the wrong direction so i'm looking to the gods for some help. I have a web form and on this web for is text boxes, and on the bottom of the form i have a button. when the user clicks the button it should (key word should) add a row to my sql 2k server, but it's giving me problems.
All i have do aside for the buttons and the textboxes is this: i went to server explorer went to my database, click and draged the table that i'm working with onto my webform. it created my sqlconnection1 and sqldataadapter1 obj's. then i clicked on sqldataadapter1 and clicked on generate dataset and of course it made dataset11. now then in my button (which should add the row) i added this code.
me.sqlDataAdapter1.Fill(DataSet11, "client"
dim newRow as DataSet1.clientRow 'my table name is client
newRow = DataSet11.client.NewclientRow
newRow.Item("clientID" = me.textbox1.text
dataset11.client.addclientRow(newRow)'add the row to the dataset
'open up connection and update database table
me.sqlConnection1.open()
dim insRow as system.data.dataset
insRow = dataset11.getchanges(datarowstate.added)
me.sqldataadapter1.update(insRow)
me.sqlconnection1.close()
'then i run and test and no matter what i try i get errors
'this error states Me.sqldataadapter1.update(insRow)
input string was not in a correct format
thank you for any help.
john --------------
how would it be to work as a programmer again. I don't think i'll ever know.
All i have do aside for the buttons and the textboxes is this: i went to server explorer went to my database, click and draged the table that i'm working with onto my webform. it created my sqlconnection1 and sqldataadapter1 obj's. then i clicked on sqldataadapter1 and clicked on generate dataset and of course it made dataset11. now then in my button (which should add the row) i added this code.
me.sqlDataAdapter1.Fill(DataSet11, "client"
dim newRow as DataSet1.clientRow 'my table name is client
newRow = DataSet11.client.NewclientRow
newRow.Item("clientID" = me.textbox1.text
dataset11.client.addclientRow(newRow)'add the row to the dataset
'open up connection and update database table
me.sqlConnection1.open()
dim insRow as system.data.dataset
insRow = dataset11.getchanges(datarowstate.added)
me.sqldataadapter1.update(insRow)
me.sqlconnection1.close()
'then i run and test and no matter what i try i get errors
'this error states Me.sqldataadapter1.update(insRow)
input string was not in a correct format
thank you for any help.
john --------------
how would it be to work as a programmer again. I don't think i'll ever know.