www.webdeveloper.com
Results 1 to 2 of 2

Thread: Something overlooked with SQL?

  1. #1
    Join Date
    Sep 2004
    Posts
    294

    Something overlooked with SQL?

    Hopefully this is some simple error I'm overlooking in syntax. I get the following error:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

    [TCX][MyODBC]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''TestUser','Sun Mar 30 00:17:42 UTC 2008','Foo bar text')' at line 1

    /temp/chatBox.asp, line 35
    And here is the related lines (JScript):

    Code:
    	SQL = "CREATE TABLE t_chat("+ 
    		"name VARCHAR(20),"+
    		"date VARCHAR(40),"+
    		"msg VARCHAR(100)"+
    		");";
    	adoConn.Execute(SQL);
    
    	//add a test record
    	var dt = new Date();
    	SQL = "INSERT INTO t_chat"+
    		"VALUES ('TestUser','"+ dt +"','Foo bar text');";
    	adoConn.Execute(SQL); //<-- Line 35
    Any suggestions? Or is more info needed?

  2. #2
    Join Date
    Sep 2004
    Posts
    294
    nevermind, it was something simple.....I forgot a space.

    SQL = "INSERT INTO t_chat"+ ---> SQL = "INSERT INTO t_chat "+

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles