syntax help?

Results 1 to 4 of 4

Thread: syntax help?

  1. #1
    ceejay Guest

    Default syntax help?

    Trying to create a DSN-less connection to an .mdb file within my web in the "fpdb" folder. I&#039m using the following syntax to establish the connection and path: <BR><BR>Cm.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};_<BR>; uid=; pw=;"<BR><BR>I get the "unterminated string constant" message after the ;_<BR><BR>If I close the string with ", the process terminates. What am I missing here? Yes, I&#039m new at this.<BR><BR>Please respond or email to<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: syntax help?

    Try removing the underscore and making it one long line. ASP should recognize the underscore but maybe not within a string?

  3. #3
    Trung Dang Guest

    Default RE: syntax help?

    Rewrite your statement like this:<BR><BR>Cm.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};" & _<BR>"; uid=; pw=;"<BR><BR>You need to terminate the previous line with the quote (") then use the ampersand (&) with the line continuation character (_) to concatenate the next line.<BR><BR>

  4. #4
    ceejay Guest

    Default RE: syntax help?

    Trung Dang- Thanks. I have changed the syntax to your suggested. <BR><BR>Cm.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};"_<BR>"; uid=; pw=;"<BR><BR>I am now getting past the first line, but the second line comes in with "Expected end of statement" at the quote (") just before the Dbq=<BR><BR>???<BR><BR>Please respond or email to<BR> <BR><BR>--------------------------------------------------------------------------------<BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts