Author Topic: ScriptBasic Windows 32  (Read 712 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 2985
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 32
« Reply #15 on: May 15, 2020, 07:14:53 PM »


ODBC Include
Code: Script BASIC
  1. module odbc
  2.  
  3. declare sub ::Connect alias "odbc_config_connect" lib "odbc"
  4. declare sub ::RealConnect alias "odbc_real_connect" lib "odbc"
  5. declare sub ::Close alias "odbc_close" lib "odbc"
  6. declare sub ::Query alias "odbc_query" lib "odbc"
  7. declare sub ::FetchArray alias "odbc_fetcharray" lib "odbc"
  8. declare sub ::FetchHash alias "odbc_fetchhash" lib "odbc"
  9. declare sub ::AffectedRows alias "odbc_affected_rows" lib "odbc"
  10. declare sub ::Error alias "odbc_error" lib "odbc"
  11.  
  12. end module
  13.  

This example uses the MySQL 32 bit ODBC driver to access the database in the previous example.

Code: Script BASIC
  1. IMPORT odbc.sbi
  2.  
  3. dbh = odbc::RealConnect("SQLDemo","","")
  4.  
  5. SQL = "SELECT * FROM products WHERE productLine = 'Classic Cars'"
  6. odbc::query(dbh, SQL)
  7. WHILE odbc::Fetchhash(dbh, column)
  8.   PRINT column{"productCode"}," - ",column{"productName"}," - ",FORMAT("%~$###.00~",column{"MSRP"}),"\n"
  9. WEND
  10.  
  11. odbc::Close(dbh)
  12.  

Output

C:\ScriptBASIC\examples>sbc odbc_demo.sb
S10_1949 - 1952 Alpine Renault 1300 - $214.30
S10_4757 - 1972 Alfa Romeo GTA - $136.00
S10_4962 - 1962 LanciaA Delta 16V - $147.74
S12_1099 - 1968 Ford Mustang - $194.57
S12_1108 - 2001 Ferrari Enzo - $207.80
S12_3148 - 1969 Corvair Monza - $151.08
S12_3380 - 1968 Dodge Charger - $117.44
S12_3891 - 1969 Ford Falcon - $173.02
S12_3990 - 1970 Plymouth Hemi Cuda - $ 79.80
S12_4675 - 1969 Dodge Charger - $115.16
S18_1129 - 1993 Mazda RX-7 - $141.54
S18_1589 - 1965 Aston Martin DB5 - $124.44
S18_1889 - 1948 Porsche 356-A Roadster - $ 77.00
S18_1984 - 1995 Honda Civic - $142.25
S18_2238 - 1998 Chrysler Plymouth Prowler - $163.73
S18_2870 - 1999 Indy 500 Monte Carlo SS - $132.00
S18_3232 - 1992 Ferrari 360 Spider red - $169.34
S18_3233 - 1985 Toyota Supra - $107.57
S18_3278 - 1969 Dodge Super Bee - $ 80.41
S18_3482 - 1976 Ford Gran Torino - $146.99
S18_3685 - 1948 Porsche Type 356 Roadster - $141.28
S18_4027 - 1970 Triumph Spitfire - $143.62
S18_4721 - 1957 Corvette Convertible - $148.80
S18_4933 - 1957 Ford Thunderbird - $ 71.27
S24_1046 - 1970 Chevy Chevelle SS 454 - $ 73.49
S24_1444 - 1970 Dodge Coronet - $ 57.80
S24_1628 - 1966 Shelby Cobra 427 S/C - $ 50.31
S24_2766 - 1949 Jaguar XK 120 - $ 90.87
S24_2840 - 1958 Chevy Corvette Limited Edition - $ 35.36
S24_2887 - 1952 Citroen-15CV - $117.44
S24_2972 - 1982 Lamborghini Diablo - $ 37.76
S24_3191 - 1969 Chevrolet Camaro Z28 - $ 85.61
S24_3371 - 1971 Alpine Renault 1600s - $ 61.23
S24_3432 - 2002 Chevy Corvette - $107.08
S24_3856 - 1956 Porsche 356A Coupe - $140.43
S24_4048 - 1992 Porsche Cayenne Turbo Silver - $118.28
S24_4620 - 1961 Chevrolet Impala - $ 80.84
S700_2824 - 1982 Camaro Z28 - $101.15

C:\ScriptBASIC\examples>



Offline John

  • Forum Support / SB Dev
  • Posts: 2985
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 32
« Reply #16 on: May 22, 2020, 07:41:01 PM »
I'm doing a makeover of the ScriptBasic IDE/Debugger. I'm updating all the controls with Kool's VBCCR (common controls replacement library) along with expanding out the auto complete extension module function references. I hope to be done with it soon.

I will also be demonstrating the console mode remote debugger.

Offline John

  • Forum Support / SB Dev
  • Posts: 2985
    • ScriptBasic Open Source Project
Re: ScriptBasic Windows 32
« Reply #17 on: June 05, 2020, 02:23:29 AM »
No promises but I may release a 64 bit ScriptBasic Windows install in conjunction with the 32 bit release. Another goal for the 64 bit OSs is using a cross platform IDE/Debugger based on IUP. Attached is the beginning of the new IUP based IDE/Debugger.
« Last Edit: June 05, 2020, 10:55:42 PM by John »