LJK Posted November 5, 2003 Posted November 5, 2003 Hi all, I am getting the error: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll on the line DataAdpt.Fill(DataSet1, "SP_PARCEL") in the following code: Dim stcon As String = "Provider=MSDAORA;Data Source=ORA920L;User Id=GVW90;Password=GVW90" Conn = New OleDbConnection(stcon) Conn.Open() DataAdpt = New OleDbDataAdapter("Select * from SP_PARCEL where gid = 1302323", Conn) CBuild = New OleDbCommandBuilder(DataAdpt) DataSet1 = New DataSet("SP_PARCEL") DataTable1 = New DataTable("SP_PARCEL") DataAdpt.Fill(DataSet1, "SP_PARCEL") This code works fine if i replace the * in the sqlquery with one or more column names. Does anyone know why this might be? thanks lorraine Quote
XyBoy Posted November 5, 2003 Posted November 5, 2003 Well, first, you create a table (DataTable1) but you don't add it to your DataSet, so I think it is not used (I think you don't need to create it since the Adapter will create it in the DataSet. Second, are you sure the query works when you type it in SQL*Plus, or any other SQL client ? And third, could you give us the messages that come with the OleDbException ? Olivier. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.