hi i use dataadpter to conect to access database i use dataadpter.comandtext="x"; where x can be sql i think you should use this format
On Wed, Jul 7, 2010 at 1:09 AM, Averroes <[email protected]> wrote: > Hi all, > I have used the following code to connect to an oracle data base > successfully: > > ============= > string connectionString = "provider=MYPROVIDER; data > source=MYDATASOURCE;user id=ME;password=MYPASSWD"; > OleDbConnection myOleDbConnection = new > OleDbConnection(connectionString); > myOleDbConnection.Open(); > > OleDbDataAdapter myAdapter; > > myAdapter = new OleDbDataAdapter("SELECT filed FROM table", > myOleDbConnection); > DataSet objDataset1 = new DataSet(); > myAdapter.Fill(objDataset1 , "TrDateKey"); > myOleDbConnection.Close(); > =============== > > however when i replace the query "SELECT filed FROM table" by > "SELECT * FROM table", an error occurs. > > Can any one help me with this ? > > Thanks a lot
