Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TSQLStoredProc

Status
Not open for further replies.

aj1234

Programmer
Jul 29, 2004
1
US
Hi,
i am currently upgrading an application from delphi6 to 7. And i am running into a problem when i try to execute the code in delphi 7. The exception is for a stored procedure.
The code is as below:

if FImagesCntSQL = nil then
begin
FImagesCntSQL := TdbStoredProc.Create(Self);
FImagesCntSQL.SQLConnection := Connection;
// connection is of type TSQLConnection
FImagesCntSQL.StoredProcName := FCountProcName;
FImagesCntSQL.Prepared := True;
end;
FImagesCntSQL.ParamByName(CFldCheckID).Value :=AFolderID;
FImagesCntSQL.ExecProc;
Result := FImagesCntSQL.ParamByNameCFldImgpgcnt).AsInteger;

When the control comes to FImagesCntSQL.Prepared i get a Database error saying 'SQL Server Error: unassigned Code'.

Can anyone tell me why i get this error message only when i run delphi 7? Am i missing something ?
Also, i have both delphi 6 and 7 on the same computer, and i have included the dbexpress dll in my current project path.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top