dcsimg
Results 1 to 3 of 3

Thread: HELP!! String Error:

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Posts
    17

    HELP!! String Error:

    I am trying to create a string that will execute an Insert Statement for my DB.

    I am getting a syntax error. I am thinking that to concatenate a string I should use-> '"&MyString&"'???

    Heres the code

    strSQLInsertIntoRentals = "Insert into Rentals (Managed,Type,District)" Values('"&strRentalManaged&"','"&strRentalType&"','"&strRentalDistrict&"')"

    Any ideas much appreciated

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,298

    Re: HELP!! String Error:

    you need to have spaces between & and variable or "

    '" & strsting & "'

    rgds pete

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Posts
    17

    Re: HELP!! String Error:

    That worked great, thanks Pete!!

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width