BASIC Developer & Support Resources > Scripting Languages

ScriptBasic Windows 64 Bit

<< < (9/9)

Made my day. I thought COM was lost going to 64 bit. .NET is your new friend

32 and 64 bit COM Servers

I just tried the dyc extension module and SB said the module can't be loaded. If I remember correctly DYC uses ASM. Is this a Windows 32 bit only extension?


I can't seem to get the 64 bit version SBHTTPD to connect. It seems to load fine but when I try run a script it says the server can't be found. The 32 bit version works fine.

The 64 bit version of SBHTTPD for Linux runs find. It looks like this is a 64 bit Windows issue.

Here is an AJAX example working with SBHTTPD.

ScriptBasic AJAX Example

sbajax (This could have been a HTML or PHP script - I wanted to run everything on the proxy server)

--- Code: Script BASIC ---' ScriptBasic AJAX & MySQL IMPORT cgi.bas cgi::Header 200,"text/html"cgi::FinishHeader PRINT """<html><head><script>function showItems(str) {  if (str == "") {    document.getElementById("results").innerHTML = "";    return;  } else {    var xmlhttp = new XMLHttpRequest();    xmlhttp.onreadystatechange = function() {      if (this.readyState == 4 && this.status == 200) {        document.getElementById("results").innerHTML = this.responseText;      }    };"GET","/home/"+str,true);    xmlhttp.send();  }}</script></head><body> <form>  <select name="items" onchange="showItems(this.value)">    <option value="">Product Line</option>    <option value="Classic Cars">Classic Cars</option>    <option value="Motorcycles">Motorcycles</option>    <option value="Planes">Planes</option>    <option value="Ships">Ships</option>    <option value="Trains">Trains</option>    <option value="Trucks and Buses">Trucks and Buses</option>    <option value="Vintage Cars">Vintage Cars</option>  </select></form><br><div id="results"></div> </body></html>"""

--- Code: Script BASIC ---' AJAX - IMPORT cgi.basIMPORT mysql.bas cgi::Header 200,"text/html" PRINT """<!DOCTYPE html><html><head><style>table {  width: 100%;  border-collapse: collapse;} table, td, th {  border: 1px solid black;  padding: 5px;} th {text-align: left;}</style></head><body>""" product_line = cgi::GetParam("q") dbh = mysql::RealConnect("localhost","USERID","PASSWORD","classicmodels")mysql::query(dbh,"SELECT * FROM products WHERE productLine = '" & product_line & "'") PRINT """<table>  <tr>    <th>Product Code</th>    <th>Product Line</th>    <th>Product Vendor</th>    <th>Product Name</th>    <th>In Stock</th>    <th>Cost</th>    <th>MSRP</th>  </tr>""" WHILE mysql::FetchHash(dbh,column)  PRINT "  <tr>\n"  PRINT "    <td>", column{"productCode"}, "</td>\n"  PRINT "    <td>", column{"productLine"}, "</td>\n"  PRINT "    <td>", column{"productVendor"}, "</td>\n"  PRINT "    <td>", column{"productName"}, "</td>\n"  PRINT "    <td align=\"right\">", column{"quantityInStock"}, "</td>\n"  PRINT "    <td align=\"right\">", FORMAT("%~$###.00~",column{"buyPrice"}), "</td>\n"  PRINT "    <td align=\"right\">", FORMAT("%~$###.00~",column{"MSRP"}), "</td>\n"  PRINT "  </tr>\n"WEND PRINT """</table></body></html>""" mysql::Close(dbh) 


[0] Message Index

[*] Previous page

Go to full version