Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-06

ODBC

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

DEMIERRE Osvaldo TECSIS

Hi

I am running FPC 1.06 on WIN2000 and I want to work with MySQL 4.0.13. I tried to run el demo program "TESTODBC.PP" (previous adapter it) but I have problem with fields of type "VARCHAR"... Question: only support is for type "CHAR"?

Another question: I have modified this example program for show the values after "select" but there are any wrong with these (I received the data TRUNCATED):

My modified code:

(...)
        repeat
            for c:=1 to colCount do
            Move(Cols[c].Coldata^,var1,Cols[c].ColSize);
            writeln(var1);
(...)

The package "ODBC" work with ODBC 3.51 or only with ODBC 2.5?

Can someone give me a hint?

Where are more examples?

Thanks in advance.

PD.:Sorry for my bad English! (I speak Spanish!)

Reply by email

Michael Van Canneyt
to DEMIERRE Osvaldo TECSIS
DEMIERRE Osvaldo TECSIS wrote 6 lines
Hi I am running FPC 1.06 on WIN2000 and I want to work with MySQL 4.0.13. I tried to run el demo program "TESTODBC.PP" (previous adapter it) but I have problem with fields of type "VARCHAR"... Question: only support is for type "CHAR"?

This depends on the ODBC driver, not on the Pascal binding to ODBC.

Show quoted text 15 lines
Another question: I have modified this example program for show the values after "select" but there are any wrong with these (I received the data TRUNCATED): My modified code: (...) repeat for c:=1 to colCount do Move(Cols[c].Coldata^,var1,Cols[c].ColSize); writeln(var1); (...) The package "ODBC" work with ODBC 3.51 or only with ODBC 2.5?

The headers of 3.51 have been converted.

Can someone give me a hint? Where are more examples?

There are none except for the ones in the sources. You can also look at the OOP wrapper in the fcl/db/odbc directory.

Michael.

Reply by email