Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help please.. SP param only passing first character...

Status
Not open for further replies.

asiavoices

Programmer
Joined
Sep 20, 2001
Messages
90
Location
CA
Hi all,

I am trying to create a stored procedure in a SQL Server 2000 database using a small visual basic application we have created. This is an example of code I used:

CREATE PROCEDURE delete_employee @empID varchar(20)
AS

DELETE from skills
Where skills.employeeID = @empID

DELETE from Availability
Where Availability.employeeID = @empID

...


-----------------

However, this produces a weird error in that it is only passing the First character only in the parameter , @empID.

For example when I pass empID = "2333" from VB, value that is received in side this code is only "2".

What am I doing wrong? Is it possible to create a stored procedure in a SQL Server DB from Visual Basic 6.0?

The following code shows how I call the stored procedure in my VB program.

.....
Employeeskills.dbo_delete_employee txtEmployeeID.Text
.........

Any help is greatly appreciated.

Cheers,

Christopher

 

If you are passing a string or character data, include quotes.

"Employeeskills.dbo_delete_employee '" & _
txtEmployeeID.Text & "'" Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top