Hi, I've a problem with C#.NET MS visual studio.NET 2003 , any body can help? I'll appreciate that!!?
2007-01-03 02:44:10 UTC
I want to access an Access database, try catch block gave me the error that "syntax error in INSERT INTO statement" while I'm sure that the syntax is true!! what is the problem I don't know!! I need to insert data into that database, plz help!! thx
Four answers:
Smutty
2007-01-03 11:50:52 UTC
The INSERT statement must be wrong then. If you are building the Query dynamically, then watch for spaces between the words.
SMS
2007-01-03 02:45:53 UTC
End the statement with a semicolon
2007-01-03 08:30:37 UTC
command = new OleDbCommand();
command.Connection = new OleDbConnection(Provider=Microsoft.Jet.OLEDB.4.0;Data Source=[databaseFilename]);
command.CommandText = "Insert into BOB set Name = hello;";
try
{
command.Connection.Open();
command.ExecuteNonQuery();
}
catch(OleDbException e)
{
throw new Exception(e.Message);
}
Finally
{
command.Connection.Close();
}
?
2016-11-26 05:20:51 UTC
My spouse and that i are nicely-known Pioneers. We the two artwork to maintain our pioneering. yet we've section time jobs. We the two have an acquaintances degree. i grew to become into originaly examining to grow to be an architect yet with the aid of fact the justifications the place the incorrect ones (money and prestiege), eventhough i grew to become into mind-blowing at it, i desperate to evaluate if for me it can be a mind-blowing option to proceed in that. So I droped out and analyze near to domicile at a technical college a quick 2 12 months degree in workstation Programing. i'm additionally good at that, even yet it grew to become into additionally a waste of time, why? with the aid of fact down right here the place I stay its an extremely slow profesion. i could ought to flow to the metropolitan section and which would be a bad selection. So my job actualy has to do with Signmaking / merchandising / secret procuring / Artisan artwork / Woodworking / and so on / and so on. so which you notice, as a fashion to pioneer, we ought to continuously be ingenious to be self protecting. i'm no longer wealthy and many could evaluate that i'm economicaly undesirable. i do no longer earn lots yet its barely sufficient to no longer qualify for government help. so which you notice, we ought to continuously do the final we are able to with out sacrificing our provider to Jehovah. it somewhat is a query of balancing issues out. in case you relly on government help, nicely then you truly ought to learn your self and notice in case you would be considered self protecting. yet once you reject government help once you CUALIFY for it, then it ought to be satisfaction or different issues. So its a stability. i'm confident that in case you be able to stability the two issues out, then you truly will see which you would be waiting to nicely-known pioneer, and in case you're making the room to get married, then with yet another brother who's a RP and extremely non secular, you would be waiting to savour that part of life additionally. in case you opt for to stay single, you would be waiting to additionally savour that and each and all of the better freedom that provides you. i desire that helps. be satisfied to e mail me in case you want to proceed to communicate relating to the priority. awareness + utility = know-how
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.