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
- 8 years ago
- 5 years ago
- 2 years ago
- 12 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago