Board index » delphi » MSSQL , ODBC how to get resultset from SP

MSSQL , ODBC how to get resultset from SP

Dear All,

I am trying to get a resultset back from a stored procedure, MSSQL using
ODBC.  The help says use a TQuery if you are returning a result set (not
TStoredProc), the example given uses Interbase where you just use the sp
name instead of a tablename in a select statement (select * from
mystoredproc). With ODBC it just comes back and says "invalid table name".
Using SQLExplorer withe MSSQL odbc connection produces the same results.

Anyone know how to do this.

Dennis Cons.

 

Re:MSSQL , ODBC how to get resultset from SP


In the past I have used a TStoredProc with no problems.  You can do a .Open
on it just as if it was a query.

Quote
"Dennis Cons" <justden...@earthlink.net> wrote in message

news:3e90ba5c$1@newsgroups.borland.com...
Quote
> Dear All,

> I am trying to get a resultset back from a stored procedure, MSSQL using
> ODBC.  The help says use a TQuery if you are returning a result set (not
> TStoredProc), the example given uses Interbase where you just use the sp
> name instead of a tablename in a select statement (select * from
> mystoredproc). With ODBC it just comes back and says "invalid table name".
> Using SQLExplorer withe MSSQL odbc connection produces the same results.

> Anyone know how to do this.

> Dennis Cons.

Other Threads