TestingM Posted January 28, 2016 Share Posted January 28, 2016 Does anyone know how to send an empty parameter string to a SQL Server stored procedure properly? If my string is empty, VB6 sends 8000 space characters to SQL Server which is somewhat annoying. I'm using an ADODB command to send the query. Technically I guess I could send some weird character code that will never occur normally but that's not perfect. Quote Link to comment Share on other sites More sharing options...
->SK<- Posted January 28, 2016 Share Posted January 28, 2016 Is the parameter recieving row allowed to take nulls? In that case I would just send the following : insert into atable (stuff, is, here) values(vara, varb, null); Quote Link to comment Share on other sites More sharing options...
TestingM Posted January 28, 2016 Author Share Posted January 28, 2016 It's going to a stored procedure, not an insert statement. It starts off as a zero length string in VB6 but SQL Server Profiler shows 8000 spaces being sent to SQL Server. Quote Link to comment Share on other sites More sharing options...
->SK<- Posted January 28, 2016 Share Posted January 28, 2016 It's going to a stored procedure, not an insert statement. It starts off as a zero length string in VB6 but SQL Server Profiler shows 8000 spaces being sent to SQL Server. Fair enough. Do you have an example of the procedure you're using now? It might help me get round to try and fix it. I would (try) to build one myself but I would have nothing to go by. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.