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
hercules
Posts: 21Questions: 9Answers: 0
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
This discussion has been closed.
Answers
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