E
eagle
How can I return the new id that is created when an insert command is used?
for example:
qry = "insert into tblClients (lname, fname) values ('smith', 'joe')"
Dim xyz as string = command.executescalar(strconn, commandtype.text, qry)
I tried this and received an error "System.NullReferenceException: Object
reference not set to an instance of an object"
Although the insert does take place. How would I do this? I can't create a
stored procedure for this for various reasons.
for example:
qry = "insert into tblClients (lname, fname) values ('smith', 'joe')"
Dim xyz as string = command.executescalar(strconn, commandtype.text, qry)
I tried this and received an error "System.NullReferenceException: Object
reference not set to an instance of an object"
Although the insert does take place. How would I do this? I can't create a
stored procedure for this for various reasons.