In brief the only involved variable is conn, the connection, which has all values assigned but the Server Version and Base that cannot be otherwise because the connection is closed: what is not suprising given what is applied to the conn variable is the open operation. This is the expanded pallette.
Of course that might all boil down to the connection string I got from various internet sites: another one I found is the following, returning...
User Profile
Collapse
-
In the following the revised message: please delete the present one if possible, I am not able to do it myself.Leave a comment:
-
So far I can get myself on my own feet..., after all I am in programming since my graduation 20 years ago, albeit not in the .Net environment and with gaps.
The problem is that the error is returned _inside_ the opening of the connection where the debugger has no way to enter.
In the previous case it was _inside_ the query execution, exactly in the same situation.Leave a comment:
-
I immediately follow your suggestion in posting another try, this time with an ODBCDrvriver: here the error appears at connection time and reports a reference to an unassigned object. This is the new code:
Code:public void SQLCommandWithParam(string name, byte[] image) { OdbcConnection conn = new OdbcConnection(); conn.ConnectionString = @"Dsn=.\DataBase\BRP.mdb";
Leave a comment:
-
Syntax error in OLEDB Insert statement with parameters
Hullo,
I have a quite simple piece of code that returns a syntax error in the query execution: Have you got any idea about what might be wrong?
Code:public void SQLCommandWithParam(string name, byte[] image) { OleDbCommand sqlCommand1 = new OleDbCommand(); System.Data.OleDb.OleDbConnection myOleConnection = new System.Data.OleDb.OleDbConnection();
Last edited by tlhintoq; Mar 23 '10, 04:42 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
No activity results to display
Show More
Leave a comment: