Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2007, 02:15 PM
Authorized User
 
Join Date: Jul 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple yet confusing

Hi,
I have a procedure where the following line of code is included:

strTSQL = "EXEC sp_gettitles " & lngParam

However, in the above lngParam is a long value.
How will the code change if the above parameter is a string one
i.e. strParam is string. Thanks in advance
 
Old July 21st, 2007, 01:24 PM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

IF you mean you want to call your SP by passing a string value then this is how you will need to change your code

strTSQL = "EXEC sp_gettitles '" & lngParam & "'"

hope this helps






Similar Threads
Thread Thread Starter Forum Replies Last Post
confusing in ADO.NET Entity Data Model,Linq to sql angelboy ADO.NET 5 November 21st, 2008 05:01 PM
Simple Q Apocolypse2005 Beginning VB 6 5 August 8th, 2007 08:04 AM
WOW--TIO-0905 VERY confusing rsearing BOOK: Beginning ASP.NET 2.0 and Databases 9 October 12th, 2006 12:36 PM
class and struct variables are confusing webworldman C# 2 August 7th, 2006 03:42 AM
Confusing problem in C++ RCB C++ Programming 3 February 26th, 2005 07:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.