21
Scripting Languages / Re: ScriptBasic 3.0
« Last post by John on April 13, 2024, 07:53:43 PM »I found the the issue with FetchHash(). I'm going to try these changes on the Windows 64 MSVC version to make sure it works there as well. If all is good, I'll push the changes to the repo.
Code: C
- SQLULEN ColSize; // JRS
- // SQLUINTEGER ColSize;
Code: ScriptBasic
- IMPORT odbc.bas
- ON ERROR GOTO Ouch
- dbh = ODBC::RealConnect("PSQL","postgres","<Password>")
- ODBC::Query(dbh, "SELECT * FROM film LIMIT 10")
- WHILE ODBC::FetchHash(dbh,column)
- PRINT column{"title"}," - ",column{"description"}, "\n"
- WEND
- Done:
- ODBC::Close(dbh)
- END
- Ouch:
- PRINT "DEBUG: ", ODBC::Error(dbh), "\n"
- GOTO Done
Code: Text
- jrs@linux-dev:~/sb/examples$ scriba sql_odbc.sb
- Chamber Italian - A Fateful Reflection of a Moose And a Husband who must Overcome a Monkey in Nigeria
- Grosse Wonderful - A Epic Drama of a Cat And a Explorer who must Redeem a Moose in Australia
- Airport Pollock - A Epic Tale of a Moose And a Girl who must Confront a Monkey in Ancient India
- Bright Encounters - A Fateful Yarn of a Lumberjack And a Feminist who must Conquer a Student in A Jet Boat
- Academy Dinosaur - A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teacher in The Canadian Rockies
- Ace Goldfinger - A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China
- Adaptation Holes - A Astounding Reflection of a Lumberjack And a Car who must Sink a Lumberjack in A Baloon Factory
- Affair Prejudice - A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a Monkey in A Shark Tank
- African Egg - A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursue a Forensic Psychologist in The Gulf of Mexico
- Agent Truman - A Intrepid Panorama of a Robot And a Boy who must Escape a Sumo Wrestler in Ancient China
- jrs@linux-dev:~/sb/examples$