| | |
Auto increment proble...
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
select the last OrderId value then + 1.
ex : 1,2,3
Select last value = 3, then 3 + 1 = 4...
ex : 1,2,3
Select last value = 3, then 3 + 1 = 4...
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
Or u can set data types as AutoNumber
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: May 2008
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
dear friends,
I am using MS access as back end and vb.net as front end.
in one of my table i have a auto increment field.(for ex:orderid).
Please tell me how can i insert new row to the table with auto increment field.
Thanking you,
just imagin ur table orderid is ur column name ok so just write follwoing code.
public sub Form_Load()
Dim cmd as new OledbCommand("Select * from TableName",cn) 'cn is Connection Object
cn.open()
Dim dr as oledbdatareader=cmd.executereader
while dr.read()
TextBox1.Text=dr(0)
End While
TextBox1.Text=Val(TextBox1.Text) + 1
dr.close()
cn.close()
End Sub
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: login verification form
- Next Thread: Webcam Image Capture
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile module ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 port print printpreview problemwithinstallation project record reports" reuse save savedialog serial sorting sqldatbase storedprocedure string temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml






