GetOleDbSchemaTable
- From: "Hideen" <hideen@xxxxxxxxxx>
- Date: Fri, 17 Feb 2006 08:35:46 +0100
I writing program in Visual Studio C++ Exprees 2005.
...
conn->Open();
DataTable^ GetTables(OleDbConnection^ conn)
{
array<Object ^> restrictions[] = {"0", "0", "0", "TABLE"};
DataTable^ schemaTable =
conn->GetOleDbSchemaTable(OleDbSchemaGuid::Tables,
restrictions);
conn->Close();
return schemaTable;
};
When I run my program receive error:
"Incorrect parameter" What is wrong ?
Now I write my programe like this:
try
{
DataTable^ schemaTable = con->GetOleDbSchemaTable(OleDbSchemaGuid::Tables,
gcnew array<Object^> {"\0","\0","\0","Table"});
return schemaTable;
}
catch (OleDbException^ ex)
{
MessageBox::Show(ex->StackTrace,"1",
MessageBoxButtons::OKCancel,MessageBoxIcon::Asterisk);
}
and receive:
incorrect parameter
at System.Data.OleDb.OleDbConnectionInternal.GetSchemaRowset(Guid schema,
Object[] restrictions)
at System.Data.OleDb.OleDbConnection.GetOleDbSchemaTable(Guid schema,
Object[] restrictions)
at xxx.Form1.GetTables(OleDbConnection con) in c:\documents and
settings\mattx\moje dokumenty\visual studio
2005\projects\xxx\xxx\form1.h:line 69
at xxx.Form1.DataBaseCheck() in c:\documents and settings\mattx\moje
dokumenty\visual studio 2005\projects\xxx\xxx\form1.h:line 386
What is wrong ?
Help me !!!
.
- Prev by Date: Re: Redirecting Assembly Binding
- Next by Date: 100-continue status and HttpSoapClientProtocol (Webservice consumer)
- Previous by thread: MABLE - J2EE Business Rule/Logic Engine for JBoss is under free software license ! Download and use for free !
- Next by thread: 100-continue status and HttpSoapClientProtocol (Webservice consumer)
- Index(es):
Loading