Home All Groups Group Topic Archive Search About

retriving data from a temporal table

Author
19 Aug 2005 4:14 PM
Jorge Lozano
Hi ,

I've created a stored procedure wich creates a temporal table (called
#results) , then i fill the table with data and finally at the end of the
procedure i make a "Select * FROM #Results" .

When i execute the procedure from the query analizer  i can  get the data
without any problem. But if i try to get the data into a visual basic ADO
recordset it always fails. I think the problem is because i'm using a
temporal table , but i need to use that solution.

If someone could give me one solution to get the data of a temporal table
into a recordset i'd been thankful.

Thanks in advance for you answers and pardon for my bad english.

Author
19 Aug 2005 4:19 PM
Chandra
hi

u can use temp table when u call from VB program, but u need to do everything
1. Create Table
2. Insert Data
3. Retrive data

in the same SP. else the data will be deleted / scope is lost

please let me know if u have any questions


--
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---------------------------------------



Show quote
"Jorge Lozano" wrote:

> Hi ,
>
> I've created a stored procedure wich creates a temporal table (called
> #results) , then i fill the table with data and finally at the end of the
> procedure i make a "Select * FROM #Results" .
>
> When i execute the procedure from the query analizer  i can  get the data
> without any problem. But if i try to get the data into a visual basic ADO
> recordset it always fails. I think the problem is because i'm using a
> temporal table , but i need to use that solution.
>
> If someone could give me one solution to get the data of a temporal table
> into a recordset i'd been thankful.
>
> Thanks in advance for you answers and pardon for my bad english.
Author
19 Aug 2005 4:54 PM
Tibor Karaszi
My guess is that it will work if you add SET NOCOUNT ON in the beginning of your stored procedure.

Show quote
"Jorge Lozano" <JorgeLoz***@discussions.microsoft.com> wrote in message
news:FED3495C-D379-457D-AE02-D9B188B156BC@microsoft.com...
> Hi ,
>
> I've created a stored procedure wich creates a temporal table (called
> #results) , then i fill the table with data and finally at the end of the
> procedure i make a "Select * FROM #Results" .
>
> When i execute the procedure from the query analizer  i can  get the data
> without any problem. But if i try to get the data into a visual basic ADO
> recordset it always fails. I think the problem is because i'm using a
> temporal table , but i need to use that solution.
>
> If someone could give me one solution to get the data of a temporal table
> into a recordset i'd been thankful.
>
> Thanks in advance for you answers and pardon for my bad english.
Author
19 Aug 2005 5:24 PM
Jorge Lozano
It worked Perfect!!!

Thanks a loot Tibor i owe you a very big beer.

Show quote
"Tibor Karaszi" wrote:

> My guess is that it will work if you add SET NOCOUNT ON in the beginning of your stored procedure.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
>
> "Jorge Lozano" <JorgeLoz***@discussions.microsoft.com> wrote in message
> news:FED3495C-D379-457D-AE02-D9B188B156BC@microsoft.com...
> > Hi ,
> >
> > I've created a stored procedure wich creates a temporal table (called
> > #results) , then i fill the table with data and finally at the end of the
> > procedure i make a "Select * FROM #Results" .
> >
> > When i execute the procedure from the query analizer  i can  get the data
> > without any problem. But if i try to get the data into a visual basic ADO
> > recordset it always fails. I think the problem is because i'm using a
> > temporal table , but i need to use that solution.
> >
> > If someone could give me one solution to get the data of a temporal table
> > into a recordset i'd been thankful.
> >
> > Thanks in advance for you answers and pardon for my bad english.
>
>
Author
19 Aug 2005 5:59 PM
Tibor Karaszi
Watch out. I'm an excellent beer drinker ;-)

Show quote
"Jorge Lozano" <JorgeLoz***@discussions.microsoft.com> wrote in message
news:02F4D367-6A89-49C9-9971-BE5BA4927491@microsoft.com...
> It worked Perfect!!!
>
> Thanks a loot Tibor i owe you a very big beer.
>
> "Tibor Karaszi" wrote:
>
>> My guess is that it will work if you add SET NOCOUNT ON in the beginning of your stored
>> procedure.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "Jorge Lozano" <JorgeLoz***@discussions.microsoft.com> wrote in message
>> news:FED3495C-D379-457D-AE02-D9B188B156BC@microsoft.com...
>> > Hi ,
>> >
>> > I've created a stored procedure wich creates a temporal table (called
>> > #results) , then i fill the table with data and finally at the end of the
>> > procedure i make a "Select * FROM #Results" .
>> >
>> > When i execute the procedure from the query analizer  i can  get the data
>> > without any problem. But if i try to get the data into a visual basic ADO
>> > recordset it always fails. I think the problem is because i'm using a
>> > temporal table , but i need to use that solution.
>> >
>> > If someone could give me one solution to get the data of a temporal table
>> > into a recordset i'd been thankful.
>> >
>> > Thanks in advance for you answers and pardon for my bad english.
>>
>>

AddThis Social Bookmark Button