Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
Hi, Michelle,
Try something like this. This is untested, uses DelphiScript, and uses MSSQL but the concepts should be the same and should show how to build something like this.
Try something like this. This is untested, uses DelphiScript, and uses MSSQL but the concepts should be the same and should show how to build something like this.
function GetTableValue;
var
lADOObject;
lADOCommandObject;
begin
lADOObject := DDT.ADODriver;
lADOConnectObject := DDT.ADODriver.ADOConnectionObject;
lADOObject.ADOConnectionObject.ConnectionString := Provider = 'SQLOLEDB; User ID = sa; Password = testing; Initial Catalog = QASCRIPTS30; Data Source = qatest02\SQLExpress; LoginPrompt := False;';
lADOObject.ADOCommandObject.CommandText := 'SELECT Name from Customers where CustomerID = 1';
Result := lADOObject.Value[0];
end;
Related Content
Recent Discussions
- 2 hours agomegha_phophalia
Log functions
Solved2 hours agoAurore- 11 hours agoMW_Didata
- 12 hours agoNaynab