Hi everyone 
I have pdata value as string:
Code:
Dim pdata(0 To 29) As String
For the last value (ID), I want my program to calculate next suitable number. Next ID should be 1 greater then the last one in SQL database, so my SQL query is:
Code:
SELECT TOP 1 MAX(VAL(ID)) + 1
That gives me the number I need.
How do I get this value to variable? And then assign it to pdata variable for sending it to database along with my other fields (pdata stands for parsed data
)
Code:
pdata(29) = sql query??
I've tried some options, but could not get it to work. Any ideas?
Thanks!