Hello 1deejuk,Hi,After I add a new customer to my database, I would like to return the ID which was automatically created via auto increment if this is possible?Current code to add the data to table: Me.CustomersTableAdapter1.InsertCustomer(CompName.Text, ContactName.Text, address1.Text, address2.Text, address3.Text, postcode.Text, ContactNo.Text, DateValue(Now), userid.Text)an easy way to get the last id and retrieve as many rows to the table, assuming that you have a dataset in your application, this example writes to a textbox controlthe number of rows in the table. Hi,Thanks for your replies, that was very helpful I do have this on the end of my insert query 'SELECT ID, companyname, contactname, address1, address2, address3, postcode, contactnumber, datereg, userid FROM Customers WHERE (ID = SCOPEIDENTITY)' but itallways returns '1' even when it is say 6,7,8??Is the query wrong or am I returning it wrong?
Long Path Tool
I just have: Result = Me.CustomersTableAdapter1.InsertCustomer(CompName.Text,etc.)My guess is that it is allways returning 1 as the result of success on adding a new row, so I guess the query is wrong?Thanks. Sorry the ID gets shown in a msg box after the insert shown below in the code, I changed -1 to +1 which ended up being just 1 as I thought -1 would be the direcrion of the increment, is this wrong should have I left it to -1? (just tried putting 1 back to-1 did not make a difference )Result = Me.CustomersTableAdapter1.InsertCustomer(CompName.Text, ContactName.Text, address1.Text, address2.Text, address3.Text, postcode.Text, ContactNo.Text, DateValue(Now), userid.Text)MsgBox('Customer added successfuly, you can now add quotes to this customer!
Database administrator free download - Password Administrator, Silver Sash Administrator Free, Administrator, and many more programs. Theses and Dissertations Available from Pro. Gonadal intersex in teleosts: Mechanisms, molecular biomarkers and diagnostic assays Abotalib, Mohammed (2. Providing you with the updated and fully working games, cracks. Skip to content. Games Crack – All the Latest Games, Cracks, Keygen. Fifa 18 pc game download. Aqua Data Studio Crack is the best database Integrated Development Environment. Database Administrator Tools. Aqua Data Studio 18-5 Crack – Soft Download Games. MySQL Administrator, free and safe download. MySQL Administrator latest version: A free Development program for Windows. MySQL Administrator is a free program only.
New Customer ID ' + Result, vbInformation)Thanks.