BASIC Developer & Support Resources > Scripting Languages

ScriptBasic Windows 64 Bit

<< < (3/9) > >>

John:
Good News!

The ODBC extension for 64 bit compiled with TDM-GCC-64. I haven't tried it yet but at least it built.


--- Code: Bash ---C:\sbgcc\sbw64_src\extensions\odbc>mingw32-make -B -f Makefilegcc -w -D_WIN32 -m64 -c -o ..\..\bin\mod\obj\odbc\s_interface.o interface.car -r ..\..\bin\mod\lib\odbc.a ..\..\bin\mod\obj\odbc\s_interface.o C:\TDM-GCC-32\lib\libodbc32.a C:\TDM-GCC-32\lib\libodbccp32.aar: creating ..\..\bin\mod\lib\odbc.agcc -w -D_WIN32 -m64 -c -o ..\..\bin\mod\obj\odbc\interface.o interface.cgcc -Wno-write-strings -D_WIN32 -static-libgcc -pipe -shared -w -s -O2 -m64 -Wl,--add-stdcall-alias,--output-def,"..\..\bin\mod\dll\odbc_imp.def",--out-implib,"..\..\bin\mod\dll\odbc_imp.a" -o ..\..\bin\mod\dll\odbc.dll ..\..\bin\mod\obj\odbc\interface.o -lodbc32 -lodbccp32 C:\sbgcc\sbw64_src\extensions\odbc> 

John:
I just rebuilt it using the Makefile you sent me. Compiled fine. I'll give it a try shortly.

It connects to the Postgres SQL server using the 64 bit ODBC driver but fails on the query.


I needed to use the unicode version of the Postgres SQL ODBC driver.  The data is being truncated.


--- Code: Script BASIC ---IMPORT odbc.sbi dbh = odbc::RealConnect("BIO64U","","")SQL = "SELECT * FROM ar_customer LIMIT 10"odbc::query(dbh, SQL)WHILE odbc::Fetchhash(dbh, column)  PRINT column{"customerno"}," - ",column{"customername"},"\n"WEND odbc::Close(dbh) 

C:\ScriptBasic\examples>sbc psql_64.sb
    MT0 -      Man Technologies
    BA7 -     BA
    NG6 -      Bin Hindi Group
    184 -     trong Atl St Univ Biol
    999 -     trong Atl St Univ
    TP8 -     American Business Review
    060 -      Arundel CC Biol
    476 -     linik RWTH Aachen
    EN7 -     ersitatsklinikum Aachen
    NA8 -     rto Aduna

C:\ScriptBasic\examples>


The VB6 ODBC viewer I have works with the 32 bit Postgres SQl ODBC unicode driver.

The Postgres SQL 32 bit Unicode driver works fine with SB 32.


C:\ScriptBasic\examples>sbc psql_32U.sb
12THMT0 - 12th Man Technologies
AAARBA7 - AAARBA
AABING6 - A.A. Bin Hindi Group
AABS184 - Armstrong Atl St Univ Biol
AABS999 - Armstrong Atl St Univ
AABWTP8 - abr American Business Review
AAC7060 - Anne Arundel CC Biol
AACH476 - Uniklinik RWTH Aachen
AACHEN7 - Universitatsklinikum Aachen
AADUNA8 - Alberto Aduna

C:\ScriptBasic\examples>

John:
I tried MS SQL Server using the 32/64 bit native client ODBC driver. I couldn't connect to the DB with SB 64 ODBC but using the same driver under SB 32 bit works fine.


--- Code: Script BASIC ---IMPORT odbc.sbi dbh = odbc::RealConnect("MSSQL","","")SQL = "SELECT * FROM johnspikowski.AR_Customer"odbc::query(dbh, SQL)WHILE odbc::Fetchhash(dbh, column)  PRINT column{"CustomerNo"}," - ",column{"CustomerName"},"\n"WEND odbc::Close(dbh) 

C:\ScriptBasic\examples>sbc mssql32.sb
ABF - American Business Futures
ABS - ABS - Sage cloud for invoices
AVNET - Avnet Processing Corp
BRESLIN - Breslin Parts Supply
HILLSB - Hillsboro Service Center
INACTIV - Inactive Customer **INACTIVE**
INTMEX - Int. Cust with Mexican Address Name expanded to 50
MAVRK - Maverick Papers
RSSUPPL - R & S Supply Corp.
SHEPARD - Shepard Motorworks
ALLENAP - Allen's Appliance Repair
AMERCON - American Concrete Service
ATOZ - A To Z Carpet Supply
AUTOCR - Autocraft Accessories
BAYPYRO - Bay Pyrotronics Corp.
CAPRI - Capri Sailing Ships
CUSTOM - Custom Craft Products
GREALAR - Greater Alarm Company
JELLCO - Jellco Packing
ORANGE - Orange Door & Window Co.

C:\ScriptBasic\examples>


My guess at this point is the SB 64 bit ODBC extension module isn't working correctly.

John:
Creating a new MS SQL 64 bit ODBC definition allow me to connect to the DB but Query caused an extension module failure.

AIR:
Don't you need a 64bit MySQL ODBC connector driver installed and configured?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version