Author Topic: Script BASIC project site upgrade  (Read 45271 times)

eslipak

  • Guest
Re: Script BASIC project site upgrade
« Reply #15 on: March 20, 2014, 01:36:39 PM »
still interested. Not smart enough to post anything. I expect not to be kicked out.

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Script BASIC project site upgrade
« Reply #16 on: March 20, 2014, 02:14:00 PM »
This is a bring out your dead call.  ::)

You have been flagged as an active member. Thanks !

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Script BASIC project site upgrade
« Reply #17 on: March 20, 2014, 02:18:47 PM »
Just got the Script BASIC zlib extension module compiled and here is a quick test of compressing a file to gzip format. (.gz) Attached is a WinRAR screen shot of the results.

Code: [Select]
IMPORT zlib.bas

zlib::gzip "customer.sb", "customer.gz"
« Last Edit: March 20, 2014, 02:27:06 PM by support »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Script BASIC project site upgrade
« Reply #18 on: March 22, 2014, 09:18:00 AM »
I was able to get the Script BASIC SQLite3 extension module running under Windows 7 64 bit and working with the SB ODBC extension module.  It seems I discovered a bug in the MySQL ODBC driver as it's substituting the first 5 or so characters of a returned string (column) with spaces. I'm hoping there is a fix for this already and I just need to update the driver.

Code: [Select]
import sqlite.bas

db = sqlite::open("testsql")

sqlite::execute(db,"create table demo (someval integer, sometxt text);")
sqlite::execute(db,"insert into demo values (123,'hello');")
sqlite::execute(db, "INSERT INTO demo VALUES (234, 'cruel');")
sqlite::execute(db, "INSERT INTO demo VALUES (345, 'world');")

stmt = sqlite::query(db,"SELECT * FROM demo")

while (sqlite::row(stmt) = sqlite::SQLITE3_ROW)
  if sqlite::fetchhash(stmt,column) then
    print column{"someval"},"\t-\t",column{"sometxt"},"\n"
  end if
wend

sqlite::close(db)

C:\scriptbasic\test>scriba t_sqlite3.sb
123     -       hello
234     -       cruel
345     -       world

C:\scriptbasic\test>