CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Location
    Michigan, USA
    Posts
    19

    Post Syntax error in INSERT INTO statement

    I'm trying to creat a registration page. It says I have a Syntax error in INSERT INTO statement and highlights Adapter.Update(CscapeDS, "cscape"). I've tried everything I can think of to fix it. I hope someone here can help.
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2003
    Location
    Argentina....
    Posts
    118

    Re: Syntax error in INSERT INTO statement

    I use c#, thats why i didn't understand everything, but i think that the problem is here (only if the "registration_date" is set as DateTime):

    Row.Item("registration_date") = Today & " at " & Format(Now, "t")
    My history: QB->VB->TC++->VB->VC++->VC#

  3. #3
    Join Date
    Jun 2004
    Location
    Michigan, USA
    Posts
    19

    Re: Syntax error in INSERT INTO statement

    No it's only a basic text. I didn't want to have to deal with correct formating of the date.

  4. #4
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503

    Re: Syntax error in INSERT INTO statement

    change your Select statement from
    SelectStatement = "Select * From cscape Where id=" & IDNumSent

    to simply
    SelectStatement = "Select * From cscape"

    you can debug your application and see what happens when you use first statement and when you use second statement.
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured