Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Syntax error (missing operator) in query expression 'NEXTVAL for [ IDV_CLIENT_SEQ ]'.

    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, 1
    But i am getting the error as "Syntax error (missing operator) in query expression 'NEXTVAL for [ IDV_CLIENT_SEQ ]'. "

    Please help me.....

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    What does [sysibm.sysdummy1] reference as this is probably the problem i.e. is it a control on a form and what kind of data is it?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Missing Operator error
    By data123 in forum Forms
    Replies: 1
    Last Post: 03-15-2009, 04:34 PM
  2. sql syntax error
    By SMAlvarez in forum Access
    Replies: 1
    Last Post: 03-12-2009, 09:43 PM
  3. Syntax Error In Insert Into Statement
    By frankvfox in forum Queries
    Replies: 1
    Last Post: 09-09-2008, 12:35 PM
  4. Replies: 0
    Last Post: 12-05-2005, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums