Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 4 Jahren, 5 Monaten
Letzter Beitrag:
vor 4 Jahren, 5 Monaten
Beteiligte Autoren:
richard_, KingDr, Fabrice Harari

How to return table from a MS SQL Stored procedure with native access driver?

Startbeitrag von richard_ am 09.01.2014 22:17

Just bought the WD18 MS SQL native access driver but I cant find a way to return the table of results, the stored procedure returns.

I'm not trying to return a single parameter value, but rather pass a number of parameters to the SP, and then get a table of results back.

How do I do this?

Is there a way I can also get the SP table into the analysis so that I can use it elsewhere in other parts of the program I'm writing?

Any pointers?



Hi Richard

FYI: your question has been "automatically" copied on the pcsoft US windev forum, and got an answer over there (it seems that the answer was NOT automatically copied) with a code example of what you want to achieve. This is just in case you are not reading ALSO the other forum

Best regards

von Fabrice Harari - am 10.01.2014 13:59
Thanks, just checking it out now.

von richard_ - am 10.01.2014 15:57

It's said "You cannot retrieve a stored procedure that returns records (SELECT ... FROM ...), columns." in windev help of topic "Native SQL Server Access".

My workaround is to store result set in temp table and once the code, eg,
1 exec selectTableResult 'product'
2 select * from ##tempTable to retrieve all column values


@aTable varchar(4000)
exec ('select * into ##tempTable from '+ @aTable)

It's clumsy with 2 steps but it works for me.

Appreciating if someone has a better solution than this, thanks in advance.



von KingDr - am 15.01.2014 12:12
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.