Closed GoogleCodeExporter closed 9 years ago
Hmmm, do you have a TdwsDatabaseLib component and its Script property set to
the TDelphiWebScript? Other possibility could be if you have something else
named "DataBase" in your code.
Other than these two, could you make a sample that reproduces the issue?
Original comment by zar...@gmail.com
on 3 Jun 2013 at 3:40
I didn't have the TdwsDatabaseLib component! However, I now create one (I
create all components in code):
FDBLib := TdwsDatabaseLib.Create(nil);
FDBLib.Script := FDWS;
in my scripting support code now. Is thats all what is needed or I'm still
missing something as it still doesn't work - while it compiles now without
error, only "start" is in the output for the script:
print('start');
var db := DataBase.Create('UIB', ['localhost:myDB','foo','bar']);
print('db created');
var query := db.Query('select ClientIP, Rem_Prc from LOG_InOut', []);
Original comment by ain.val...@gmail.com
on 3 Jun 2013 at 4:08
You probably have error messages in your execution (check Exec.Msgs.AsInfo f.i.)
Do you have the UIB driver unit (dwsUIBDatabase) in your "uses" on the Delphi
side? Otherwise the UIB driver won't be register and accesible in script.
Original comment by zar...@gmail.com
on 4 Jun 2013 at 6:30
That was it, I had to include the dwsUIBDatabase in the uses! It is working
now, so the issue could be closed, but I suggest to add that info also into the
wiki page, something like:
In order to use the DataBase object in a script the TDelphiWebScript must be
connected to an TdwsDatabaseLib component and appropriate driver units
(dwsUIBDatabase for the "UIB" driver, dwsSynSQLiteDatabase for the "SQLLite"
driver etc) must be used by the host program.
Original comment by ain.val...@gmail.com
on 4 Jun 2013 at 7:51
Updated wiki
Original comment by zar...@gmail.com
on 4 Jun 2013 at 9:49
Original issue reported on code.google.com by
ain.val...@gmail.com
on 3 Jun 2013 at 11:50