Using ADO in VC++
-
Hello I have a problem with using ADO in Visual C++. I'm need to get tables names of database by using types from ADO type library. I found one method: _RecordsetPtr rs_table_names = ado_conn->Execute(L"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES", NULL, -1L); But there is a problem. This method allows me to get tables names only of SQL server, but with other database formats (MS Access, TXT files, Excel) it doesn’t work. Thanks in advance.
-
Hello I have a problem with using ADO in Visual C++. I'm need to get tables names of database by using types from ADO type library. I found one method: _RecordsetPtr rs_table_names = ado_conn->Execute(L"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES", NULL, -1L); But there is a problem. This method allows me to get tables names only of SQL server, but with other database formats (MS Access, TXT files, Excel) it doesn’t work. Thanks in advance.
It looks like that Jet provider doesn't provide access to INFORMATION_SCHEMA. I found discussion about such problems. May be it'll help you.
-
It looks like that Jet provider doesn't provide access to INFORMATION_SCHEMA. I found discussion about such problems. May be it'll help you.
2Ilya: Thank you for link (Спасибо за ссылочку!). I nave another question: how can I get field data format string. When I used DAO, I got this string by DAOProperty::GetValue call. For example, this string looks like "General Number","General Date","Long Date" or something like "#,##0.00."p.";=#,##0.00"p."".