Datatable Editor Generator. I get an Exception User-Unhandled error at the following code

Datatable Editor Generator. I get an Exception User-Unhandled error at the following code

herculeshercules Posts: 21Questions: 9Answers: 0
edited May 2017 in Free community support

db.Sql( @CREATE TABLE IF NOT EXISTS audiobooks (
id int(10) NOT NULL auto_increment,
title varchar(255),
author varchar(255),
duration numeric(9,2),
readingorder varchar(255),
PRIMARY KEY( id )
);" );

The ERROR SAYS .... System.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'IF'.

Incorrect syntax near '`'.'

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,889Questions: 1Answers: 10,530 Site admin
    Answer ✓

    The SQL being used there looks like it would be suitable for MySQL , but the SqlClient in the error message suggests that the database connection is SQL Server.

    What is the data you are attempting to use? And which one did you select in Generator?

    Thanks,
    Allan

This discussion has been closed.