Page 1 of 1

Posted: Tue May 28, 2002 8:59 am
by BackupUser
Restored from previous forum. Originally posted by Bernard.

I'm looking for informations about MSJET40.DLL to try to make an database application.

Is someone can help me ?


BDu

Posted: Tue May 28, 2002 11:42 am
by BackupUser
Restored from previous forum. Originally posted by Iontichy.
I'm looking for informations about MSJET40.DLL to try to make an database application.
If i'm not completly wrong, you can create a new ODBC connection with the Jet-drivers (control panel / ODBC) to get a database connection.
Is this a access database?

---------------
star traveler

Posted: Tue May 28, 2002 1:38 pm
by BackupUser
Restored from previous forum. Originally posted by Bernard.

Yes this is an Access Database.

I try to use MSJET40.DLL API because I can't read every type of Access fields with the standard function in PureBasic (ie DateTime fields)

Thanks if you can help me

BDu

Posted: Tue May 28, 2002 2:12 pm
by BackupUser
Restored from previous forum. Originally posted by Iontichy.

Is it usefull to convert the DateTime column to a string in the query?
Like this:

Code: Select all

 
select firstname,lastname,CStr(birthday) as birthday
from t_person


---------------
star traveler

Posted: Tue May 28, 2002 2:32 pm
by BackupUser
Restored from previous forum. Originally posted by Bernard.

In fact I would like to do something more generic to read any table without to know the type of the field

BDu

Posted: Tue May 28, 2002 3:10 pm
by BackupUser
Restored from previous forum. Originally posted by Iontichy.

Then you have to use the ODBC API functions.
But this is VERY complex.

i.e.:
SQLRETURN SQLColAttribute_ (
SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
SQLUSMALLINT FieldIdentifier,
SQLPOINTER CharacterAttributePtr,
SQLSMALLINT BufferLength,
SQLSMALLINT * StringLengthPtr,
SQLPOINTER NumericAttributePtr);

---------------
star traveler

Posted: Tue May 28, 2002 3:13 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

If you are reading an Access type database, you don't need to know the field type... PB can read any field as a string.

You only need to know the field type when writing... since you cannot put string into a field defined to take numbers.

Posted: Wed May 29, 2002 8:42 am
by BackupUser
Restored from previous forum. Originally posted by Bernard.

Where can I find documentation and some samples about ODBC API ?

BDu

Posted: Wed May 29, 2002 9:03 am
by BackupUser
Restored from previous forum. Originally posted by Iontichy.

The only source i use is MSDN, but there should be more information in the internet.

---------------
star traveler