VBscript Question - InfoPath Dev
in

InfoPath Dev

VBscript Question

Last post 10-21-2010 07:23 AM by Jimmy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-20-2010 11:43 AM

    VBscript Question

    I just started using the script portion of Infopath 2003 and found some used code with "Dim Conn As AdoQueryConnection" in it.  I'm trying to establish a connection to an Acess DB to query a secondary datasource but every time I try to preview the form it hangs on AdoQueryConnection like its not sure what it is.  Is there something I need to add to my code to get this working?

  • 10-20-2010 03:26 PM In reply to

    Sounds like the code you're trying to reuse is VB code, not VBScript.  I believe in VBScript, it would just be Dim Conn, without the As AdoQueryConnection.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-21-2010 05:30 AM In reply to

    I tried to take out the second part but then it hangs on the next line

    connection = DataConnections("Previous Year")

     

    Does anyone have an example of using VBscript to make a connection to a secondary source?  Every "VBScript" example I've seen uses the "As AdoQueryConnection".

  • 10-21-2010 07:23 AM In reply to

    I think you're missing a set before that next line.  May I suggest reading up on some general VBScript tutorials before proceeding any further?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.