Re: Does Informix OLEDB support OpenSchema?
Posted in 2003
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Server Administration, Security, Permissions & Auditing
Hi, You need to run the coledbp.sql script (found in $INFORMIXDIR/etc) against the sysmaster database. These tables and stored procedures allow the oledb provider to return the database schema information. The odbc driver obtains this information in a different way. This is documented somewhat on page 2-27 of the OLEDB programmer's guide. I saw the 3251 error that you mention. It went away when the coledbp.sql script was run as DBA. Here is my program: Private Sub Command1_Click() Dim cCmd As New ADODB.Command Dim rsRow As New ADODB.Recordset Dim cn As New ADODB.Connection Dim connectstring As String connectstring = "Provider=Ifxoledbc;Data Source=stores7@bigdog_731;user id=informix;password=informix" cn.Open (connectstring) Set rsRow = cn.OpenSchema(adSchemaTables) rsRow.MoveFirst While (Not rsRow.EOF) MsgBox rsRow.Fields(1) + " " + rsRow.Fields(2) + " " + rsRow.Fields(3) rsRow.MoveNext Wend End Sub regards, shawn moe msilberb@baan.com (malky) wrote in message news:<86d37283.0306102048.6ab4e991@posting.google.com>... > i have no problem connecting, nor OLEDB niether ODBC. my problem is: > ****OpenSchema with OLEDB connection**** > > let me please paste again my original question, which i couldn't find > anywhere an answer to : > > here is code example: > > Dim conn As New ADODB.Connection > Dim rs As New ADODB.Recordset > > conn.Open "Provider=ifxoledbc;Data > Source=my_db;User=informix;Password=informix" > Set rs = conn.OpenSchema(adSchemaTables) > > connection opens successfully, but on OpenSchema i'm getting: > ADODB.Connection error number 3251: > "Object or provider is not capable of performing requested > operation." > > NOTE: schema opens successfully if i use ODBC. it is only OLEDB > problem. > > is it a known limitation, or there *is* a solution?
thanks sssso much!!! it is good that *somebody* in the wrold reads the documentation :-)... i have tried it and it works fine. i hope it will work also with columns and indexes. thanks again for answering, i almost gave up malky smoeks@yahoo.com (Shawn Moe) wrote in message news:<7df6abab.0306111207.69d9d691@posting.google.com>... > Hi, > > You need to run the coledbp.sql script (found in $INFORMIXDIR/etc) > against the sysmaster database. These tables and stored procedures > allow the oledb provider to return the database schema information. > The odbc driver obtains this information in a different way. This is > documented somewhat on page 2-27 of the OLEDB programmer's guide. > > I saw the 3251 error that you mention. It went away when the > coledbp.sql script was run as DBA. > > Here is my program: > > Private Sub Command1_Click() > > Dim cCmd As New ADODB.Command > Dim rsRow As New ADODB.Recordset > Dim cn As New ADODB.Connection > Dim connectstring As String > > connectstring = "Provider=Ifxoledbc;Data > Source=stores7@bigdog_731;user id=informix;password=informix" > cn.Open (connectstring) > > Set rsRow = cn.OpenSchema(adSchemaTables) > > rsRow.MoveFirst > While (Not rsRow.EOF) > MsgBox rsRow.Fields(1) + " " + rsRow.Fields(2) + " " + > rsRow.Fields(3) > rsRow.MoveNext > Wend > > End Sub > > > regards, > > shawn moe > > > > msilberb@baan.com (malky) wrote in message news:<86d37283.0306102048.6ab4e991@posting.google.com>... > > i have no problem connecting, nor OLEDB niether ODBC. my problem is: > > ****OpenSchema with OLEDB connection**** > > > > let me please paste again my original question, which i couldn't find > > anywhere an answer to : > > > > here is code example: > > > > Dim conn As New ADODB.Connection > > Dim rs As New ADODB.Recordset > > > > conn.Open "Provider=ifxoledbc;Data > > Source=my_db;User=informix;Password=informix" > > Set rs = conn.OpenSchema(adSchemaTables) > > > > connection opens successfully, but on OpenSchema i'm getting: > > ADODB.Connection error number 3251: > > "Object or provider is not capable of performing requested > > operation." > > > > NOTE: schema opens successfully if i use ODBC. it is only OLEDB > > problem. > > > > is it a known limitation, or there *is* a solution?