I have been trying for the last couple of weeks to insert a new record
to a database. I have been able to update the existing records but
when I try to insert it does nothing, not even give me an error code.
Below is a sample of what I've tried lately:
Try
DataAdapter.Ins ertCommand.Para meters(0).Value =
txtProfileLastN ame.Text
DataAdapter.Ins ertCommand.Para meters(1).Value =
txtProfileFirst Name.Text
.....
DataAdapter.Ins ertCommand.Exec uteNonQuery()
Catch ex As Exception
MsgBox(ex)
End Try
Some other facts that may help. I used the wizard to add the
dataadapters, datasets, and connection. The primary key for the table
in the database is an autonumber if that makes a difference. I am not
passing any values for it. Any help would be great. I have tried
everything I have found in these forums and others and none have
worked. Thanks in advance.
Mike
to a database. I have been able to update the existing records but
when I try to insert it does nothing, not even give me an error code.
Below is a sample of what I've tried lately:
Try
DataAdapter.Ins ertCommand.Para meters(0).Value =
txtProfileLastN ame.Text
DataAdapter.Ins ertCommand.Para meters(1).Value =
txtProfileFirst Name.Text
.....
DataAdapter.Ins ertCommand.Exec uteNonQuery()
Catch ex As Exception
MsgBox(ex)
End Try
Some other facts that may help. I used the wizard to add the
dataadapters, datasets, and connection. The primary key for the table
in the database is an autonumber if that makes a difference. I am not
passing any values for it. Any help would be great. I have tried
everything I have found in these forums and others and none have
worked. Thanks in advance.
Mike
Comment