Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlstringconnect and Advantage Database Server
Message
From
27/12/2002 14:48:12
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
27/12/2002 13:40:01
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00735915
Message ID:
00736169
Views:
8
The code I used was in my initial post.
CREATE TABLE Structures (FileName C(10), FieldName C(30), Type N, Value C(60), RecNo N(4), VarType C(1))
I walked thru the tables to see the field names and types. Advantage tables can have fieldnames of indefinite length and there are more types as well. This line returns the type, but it's numeric.
Type = oRecordSet.Fields.Item[x].Type
The number is defined here:
* Types returned by ado recordset.
#DEFINE DBTYPE_NULL 1
#DEFINE DBTYPE_I2 2 && Two byte signed integer.
#DEFINE DBTYPE_I4 3 && Four byte signed integer.
#DEFINE DBTYPE_R4 4 && A single-precision floating-point value: Float.
#DEFINE DBTYPE_R8 5 && A double-precision floating-point value, Double
#DEFINE DBTYPE_CY 6 && A currency value:LARGE_INTEGER Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an eight-byte signed integer, scaled by 10,000.
#DEFINE DBTYPE_DATE 7 && A date stored in the same way as in Automation: A DATE is a double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day. For example, the number 2.25 represents the datetime January 1, 1900 6:00 AM.
#DEFINE DBTYPE_BSTR 8
#DEFINE DBTYPE_IDISPATCH 9
#DEFINE DBTYPE_ERROR 10
#DEFINE DBTYPE_BOOL 11 && A Boolean value stored in the same way as in Automation: VARIANT_BOOL, 0 means false and ~0 (bitwise, the value is not 0; that is, all bits are set to 1) means true.
#DEFINE DBTYPE_VARIANT 12
#DEFINE DBTYPE_IUNKNOWN 13
#DEFINE DBTYPE_DECIMAL 14
#DEFINE DBTYPE_UI1 17
#DEFINE DBTYPE_ARRAY 0x2000
#DEFINE DBTYPE_BYREF 0x4000
#DEFINE DBTYPE_I1 16
#DEFINE DBTYPE_UI2 18
#DEFINE DBTYPE_UI4 19 && A four-byte, unsigned integer: ULONG
#DEFINE DBTYPE_I8 20
#DEFINE DBTYPE_UI8 21
#DEFINE DBTYPE_GUID 72
#DEFINE DBTYPE_VECTOR 0x1000
#DEFINE DBTYPE_RESERVED 0x8000
#DEFINE DBTYPE_BYTES 128
#DEFINE DBTYPE_STR 129
#DEFINE DBTYPE_WSTR 130
#DEFINE DBTYPE_NUMERIC 131
#DEFINE DBTYPE_UDT 132
#DEFINE DBTYPE_DBDATE 133 && A user-defined data type of variable length. In future versions, OLE DB may define the use of type libraries to support user-defined data types. This indicator does not correspond to any C data type.
#DEFINE DBTYPE_DBTIME 134
#DEFINE DBTYPE_DBTIMESTAMP 135

>Charlie,
>I have been playing with the your code for several hours. As you may have guessed I am trying to do a conversion. I want to create VFP tables that mirror the data structure of the Advantage tables and move the data from Advantage to VFP and then massage it to my purpose. Problem: using OLE DB what commands do I use to find the table structure? Thanks.
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform