Problem Determining the Number of Fields 
Author Message
 Problem Determining the Number of Fields

Hi All.

Can someone tell me how I can determine inside a Visual C++ program using
ODBC how many columns there are in a given Access table.

I have an application which creates Access tables on the fly using
CDatabase->ExecuteSQL("CREATE TABLE ...") and then adds columns to it also
using ExecuteSQL. I need to trap the case (and build another table) when I
exceed the max allowed number of columns.

I'm reasonably proficient at the MFC side of things but a total novice at
SQL so the simpler the better please!!

Thanks in advance,

Alison



Mon, 16 Aug 2004 06:35:18 GMT  
 Problem Determining the Number of Fields
Hello,

You may use CRecordset::GetODBCFieldCount()

Hope this helps.

Regards,
Max
==========================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

|Newsgroups: microsoft.public.vc.mfc
|Subject: Problem Determining the Number of Fields
|
|Hi All.
|
|Can someone tell me how I can determine inside a Visual c++ program using
|ODBC how many columns there are in a given Access table.
|
|I have an application which creates Access tables on the fly using
|CDatabase->ExecuteSQL("CREATE TABLE ...") and then adds columns to it also
|using ExecuteSQL. I need to trap the case (and build another table) when I
|exceed the max allowed number of columns.
|
|I'm reasonably proficient at the MFC side of things but a total novice at
|SQL so the simpler the better please!!
|
|Thanks in advance,
|
|Alison
|
|
|



Tue, 17 Aug 2004 15:55:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Determine wether a field is empty

2. Determine Stored Proc return fields?

3. vsprintf - how to determine number of arguments

4. portably determining number of bits in ordinal type

5. determining the number of lines in a text file

6. Determining line number in a text file

7. Determining the serial number on a hard disk

8. How to Determine VC Service Pack Number

9. variable argument lists (va_arg)--determining number of arguments

10. Determining number of dims in a VARIANT array

11. Determining Number of Rows in DOS

12. Determining number of dimensions of SAFEARRAY

 

 
Powered by phpBB® Forum Software