Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically naming local temp tables
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00961561
Message ID:
00962500
Views:
14
Thom,

I'm terribly sorry for the long delay. I've been out of the office. Anyway here is a sample of how I use my stored procedures.

--[ The stored procedure in pubs database ]
CREATE Procedure GetEmpl
@LName nVarChar(30)

as

/*
The creating of this table is just for the sake of
showing you how I use temp tables.
With a procedure as simple as this, creating the table
is just a waste
*/

Table #tmp(
LName nVarChar(50),
FName nVarChar(50),
Hired DateTime)

Insert into #tmp
Select
lname,
fname,
hire_date
From employee
Where lname Like @LName

Select * from #tmp
GO
--[End of Procedure]

I'm not sure how this is accessed using ADO.NET but with ADO 2.xx this is how I do it...

rs=cn.execute("exec GetEmpl '" & TxtLName.Text.Trim & "'")

At this point the recordset has been populated with the result of the stored procedure.

Hope this clears things up 8)

Regards
Martin
Shit happens!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform