ThunderForest
IS-IT--Management
Trying to run an ADO query, with five parameters and a stored procedure and get this exception:
Error: EOleException with message Multi-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
I've looked at the Microsoft FAQ on this, and I can only guess the problem is my connection string:
Provider=SQLOLEDB.1;Password=xyxyxy-d;Persist Security Info=True;User ID=username;Initial Catalog=xyxyxySQL;Data Source=ZZZZDATA;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MYPC;Use Encryption for Data=False;Tag with column collation when possible=False
I create these parameters in this manner:
q1.parameters.createParameter('EndDate', ftDateTime, pdInputOutput, 10, CurrDateEditPlus.Date);
q1.parameters.createParameter('salesrep', ftString, pdInputOutput, 8, SalesRepComboBox.GetComboValue(SalesRepComboBox.Text));
q1.parameters.createParameter('Employee_ID', ftString, pdInputOutput, 8, EmployeeComboBox.GetComboValue(EmployeeComboBox.Text));
q1.parameters.createParameter('program', ftString, pdInputOutput, 10, ProgramComboBox.GetComboValue(ProgramComboBox.Text));
q1.parameters.createParameter('OrderBy', ftInteger, pdInputOutput, 10, OrderByRadioGroup.ItemIndex);
The following is added to the adoquery.sql property, which works just fine in a TQuery:
xyz_reportproce :salesrep,rogram,:EndDate,:OrderBy,:Employee_ID
Any help would be appreciated. Thanks.
Getting answers before I'm asked.
Providing answers if I can.
Error: EOleException with message Multi-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
I've looked at the Microsoft FAQ on this, and I can only guess the problem is my connection string:
Provider=SQLOLEDB.1;Password=xyxyxy-d;Persist Security Info=True;User ID=username;Initial Catalog=xyxyxySQL;Data Source=ZZZZDATA;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MYPC;Use Encryption for Data=False;Tag with column collation when possible=False
I create these parameters in this manner:
q1.parameters.createParameter('EndDate', ftDateTime, pdInputOutput, 10, CurrDateEditPlus.Date);
q1.parameters.createParameter('salesrep', ftString, pdInputOutput, 8, SalesRepComboBox.GetComboValue(SalesRepComboBox.Text));
q1.parameters.createParameter('Employee_ID', ftString, pdInputOutput, 8, EmployeeComboBox.GetComboValue(EmployeeComboBox.Text));
q1.parameters.createParameter('program', ftString, pdInputOutput, 10, ProgramComboBox.GetComboValue(ProgramComboBox.Text));
q1.parameters.createParameter('OrderBy', ftInteger, pdInputOutput, 10, OrderByRadioGroup.ItemIndex);
The following is added to the adoquery.sql property, which works just fine in a TQuery:
xyz_reportproce :salesrep,rogram,:EndDate,:OrderBy,:Employee_ID
Any help would be appreciated. Thanks.
Getting answers before I'm asked.
Providing answers if I can.