Click here to Skip to main content
16,011,608 members
Home / Discussions / Database
   

Database

 
GeneralRe: Opening SQL Enterprise manager Pin
sam#21-May-07 0:18
sam#21-May-07 0:18 
Questionexecute sql statements [modified] Pin
kuwl_mark20-May-07 20:24
kuwl_mark20-May-07 20:24 
AnswerRe: execute sql statements Pin
Colin Angus Mackay20-May-07 20:58
Colin Angus Mackay20-May-07 20:58 
GeneralRe: execute sql statements Pin
kuwl_mark20-May-07 21:14
kuwl_mark20-May-07 21:14 
GeneralRe: execute sql statements Pin
Colin Angus Mackay21-May-07 1:01
Colin Angus Mackay21-May-07 1:01 
AnswerRe: execute sql statements Pin
Harini N K20-May-07 23:24
Harini N K20-May-07 23:24 
GeneralRe: execute sql statements Pin
kuwl_mark21-May-07 1:19
kuwl_mark21-May-07 1:19 
QuestionCan you tell me where I am going wrong when I try to write to a table? Pin
Khoramdin20-May-07 11:25
Khoramdin20-May-07 11:25 
Hello everyone,

I have a program which connects to an internet database(MySQL) using MyODBC. I am using the following code to write to "imagestorage" table in the "test" database. When I run this I get an Error message saying:

ERROR [HY000] [MySQL][MyODBC 5.00.11][MySQL] 1064 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 'FileName, NULL,

ConStr = "DRIVER={MySQL Connector/ODBC v5};SERVER= XXXXXXXX; PORT=3306; DATABASE=; UID=XXXXXXX; PWD= XXXXXXXX; OPTION=3";                   <br />
        OdbcCon = new System.Data.Odbc.OdbcConnection(ConStr);<br />
        OdbcCon.Open();<br />
        <br />
        OdbcCom = new System.Data.Odbc.OdbcCommand("USE test;", OdbcCon);<br />
        OdbcCom.ExecuteNonQuery();<br />
        <br />
        OdbcCom.CommandText = "INSERT INTO imagestorage VALUES(NULL, ?FileName, NULL, NULL);";<br />
        OdbcCom.Parameters.Clear();<br />
        OdbcCom.Prepare();<br />
<br />
        OdbcCom.Parameters.Add("?FileName", System.Data.Odbc.OdbcType.VarChar);<br />
        OdbcCom.Parameters["?FileName"].Value = "Khoramdin";<br />
<br />
        OdbcCom.ExecuteNonQuery(); 


Can someone be kind enough to tell me where I am going wrong?

Thank you very much and have a great day.

Khoramdin
AnswerRe: Can you tell me where I am going wrong when I try to write to a table? Pin
Dave Kreskowiak20-May-07 14:04
mveDave Kreskowiak20-May-07 14:04 
QuestionExport Data to text file Pin
FriendlySoluations20-May-07 4:57
FriendlySoluations20-May-07 4:57 
AnswerRe: Export Data to text file Pin
Dave Kreskowiak20-May-07 14:07
mveDave Kreskowiak20-May-07 14:07 
QuestionListbox + get query Pin
Thommie.h20-May-07 2:38
Thommie.h20-May-07 2:38 
Questionhow to connect to a web database Pin
lune1219-May-07 22:07
lune1219-May-07 22:07 
AnswerRe: how to connect to a web database [modified] Pin
Dave Kreskowiak20-May-07 5:05
mveDave Kreskowiak20-May-07 5:05 
QuestionRe: how to connect to a web database Pin
lune1220-May-07 9:15
lune1220-May-07 9:15 
AnswerRe: how to connect to a web database Pin
Christian Graus20-May-07 12:32
protectorChristian Graus20-May-07 12:32 
AnswerRe: how to connect to a web database Pin
Colin Angus Mackay20-May-07 20:56
Colin Angus Mackay20-May-07 20:56 
QuestionHow to query this? [modified] Pin
Arun.Immanuel19-May-07 4:26
Arun.Immanuel19-May-07 4:26 
AnswerRe: How to query this? Pin
enjoycrack19-May-07 6:10
enjoycrack19-May-07 6:10 
GeneralRe: How to query this? Pin
Arun.Immanuel19-May-07 6:28
Arun.Immanuel19-May-07 6:28 
GeneralRe: How to query this? Pin
enjoycrack19-May-07 7:02
enjoycrack19-May-07 7:02 
GeneralRe: How to query this? Pin
Arun.Immanuel19-May-07 16:54
Arun.Immanuel19-May-07 16:54 
GeneralRe: How to query this? Pin
faizankhan20-May-07 21:24
faizankhan20-May-07 21:24 
QuestionHow can I access to a resource that is created in another thread? Pin
ali_reza_zareian18-May-07 23:44
ali_reza_zareian18-May-07 23:44 
AnswerRe: How can I access to a resource that is created in another thread? Pin
Colin Angus Mackay19-May-07 11:50
Colin Angus Mackay19-May-07 11:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.