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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help.. SP param only passing first character

Status
Not open for further replies.

asiavoices

Programmer
Sep 20, 2001
90
0
0
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

 
What are the properties of the parameter in the command object? Maybe the size is set to one, or maybe it is not VarChar? just a suggestion...

Scott
shope@gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top