N
New
Hi ,
I Have access Forms which are Linked with Db2 Tables .I have created
sequence called "IDV.CLIENT_SEQ" in DB2 .
I want to show the Next Sequence Value in The access form.
The Below Db2 Query is fetching the Nextval if i run sql in Command editor.
SELECT NEXTVAL for IDV.CLIENT_SEQ as Aaa FROM sysibm.sysdummy1
Same Thing i want to implement in VBA Code.
Code:
Set con = Application.CurrentProject.Connection
stSql = "SELECT NEXTVAL for [ IDV_CLIENT_SEQ ] as Aaa FROM
[sysibm.sysdummy1]"
Set Rs = CreateObject("ADODB.Recordset")
Rs.Open stSql, con, 1But i am getting the error as "Syntax error (missing
operator) in query expression 'NEXTVAL for [ IDV_CLIENT_SEQ ]'. "
Please help me.....
I Have access Forms which are Linked with Db2 Tables .I have created
sequence called "IDV.CLIENT_SEQ" in DB2 .
I want to show the Next Sequence Value in The access form.
The Below Db2 Query is fetching the Nextval if i run sql in Command editor.
SELECT NEXTVAL for IDV.CLIENT_SEQ as Aaa FROM sysibm.sysdummy1
Same Thing i want to implement in VBA Code.
Code:
Set con = Application.CurrentProject.Connection
stSql = "SELECT NEXTVAL for [ IDV_CLIENT_SEQ ] as Aaa FROM
[sysibm.sysdummy1]"
Set Rs = CreateObject("ADODB.Recordset")
Rs.Open stSql, con, 1But i am getting the error as "Syntax error (missing
operator) in query expression 'NEXTVAL for [ IDV_CLIENT_SEQ ]'. "
Please help me.....