Guest BorisAro Posted January 14, 2007 Share Posted January 14, 2007 Hello!!SELECT * FROM Users WHERE Users.Name = 'CName'I have a sub. in VB 2005 which has as an input parameter CName.I'd like to select records with the parameter.If I write 'CName' then it looks for User.Name = "CName" and not what is in the sub. parameter.Please help Link to comment Share on other sites More sharing options...
xpriens Posted January 22, 2007 Share Posted January 22, 2007 Hi,Use the CName as a parameter like Declare @CName varchar(50)Select @CName = CNameSELECT * FROM Users WHERE Users.Name = @CNameThis should work out and keep the ball rolling... Hello!!SELECT * FROM Users WHERE Users.Name = 'CName'I have a sub. in VB 2005 which has as an input parameter CName.I'd like to select records with the parameter.If I write 'CName' then it looks for User.Name = "CName" and not what is in the sub. parameter.Please help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now