Once I run the program it give me this error:
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
Here is the code:
OleDbConnection Conn=new OleDbConnection(ConnString);
Conn.Open();
OleDbDataReader dr;
OleDbCommand dbcom=new OleDbCommand();
DataSet ds=new DataSet();
OleDbDataAdapter da=new OleDbDataAdapter();
da.SelectCommand=new OleDbCommand(Sqlstring,Conn);
da.Fill(ds);
dbcom.Connection=(Conn);
dbcom.CommandText=Sqlstring;
dr=dbcom.ExecuteReader();
it say the dbcom is undefined value.
How to fix it
Help!Thank Q
|
Go4Expert Founder
|
![]() |
| 4Jun2006,22:11 | #2 |
|
It looks like you have an error in the SQL query probably.
|
|
Contributor
|
|
| 5Jun2006,12:11 | #3 |
|
So,what should I do and how to fix it.
Thank Q Last edited by lieweffect; 5Jun2006 at 12:16.. |
|
Go4Expert Founder
|
![]() |
| 5Jun2006,14:34 | #4 |
|
By correcting the errors in the query.
|
|
Contributor
|
|
| 5Jun2006,16:28 | #5 |
|
May I know how to correct it please?
|
|
Go4Expert Founder
|
![]() |
| 5Jun2006,17:48 | #6 |
|
If you can share the query we can definitely look into it.
|
|
Contributor
|
|
| 5Jun2006,19:42 | #7 |
|
Here is the whole program code
|
|
Go4Expert Founder
|
![]() |
| 6Jun2006,04:36 | #8 |
|
Please dont attach the complete projects as its very difficult to find where the error is and where the query is. I have removed the attached project.
Please read Before you make a query. |
|
Contributor
|
|
| 6Jun2006,11:07 | #9 |
|
Sorry, because I don't know how to find the query as you know I'm the beginner of programming.If I did something please correct me!
|
|
Go4Expert Founder
|
![]() |
| 7Jun2006,11:41 | #10 |
|
Whats the value of Sqlstring when its giving the exception.
|

