1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Linked Server Sql - Get Sequence Value

Discussion in 'Development' started by bigwill, Oct 23, 2017.

  1. bigwill

    bigwill Member

    Hi all

    We have an external program that inserts data into one of our progress database. They have set up linked server within Microsoft sql-server. Today we can connect and insert records into the progress database (10.2b).

    But we would like to take use of a sequence that is defined in our database. How must we write the sql to get next value on a sequence to work ?

    We have tried db.pub.seqname.netxval without any luck. (Note that we are doing this from our .NET solution using normal odbc and it works fine there.

    Code (progress):
    1.  
    2. SET @VismaInvoiceNr = (Select VismaInvoiceNR from ...)
    3.  
    4. Insert sDB.sDB.pub.invoice([SequenceNr],[VismaInvoiceNr])
    5. values (pub.VismaInvoiceSequence.NEXTVAL, @VismaInvoiceNr)
     
  2.  

Share This Page