DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Recordset and Stored Procedure issues!

This is a discussion on Recordset and Stored Procedure issues! within the ASP Development forums, part of the Programming & Scripting category; removing the double quotes still sends the page to the ELSE statement......

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

  #11  
Old June 23rd, 2009, 10:31 AM
Centurion's Avatar
Barn Enthusiast
 
Join Date: Dec 2008
Posts: 352
Rep Power: 2
Centurion is on a distinguished road
Default

removing the double quotes still sends the page to the ELSE statement...
Reply With Quote
  #12  
Old June 23rd, 2009, 10:40 AM
Wolffy's Avatar
Wolfmaster
 
Join Date: Mar 2008
Real name: Wolff
Location: Peoria, IL
Posts: 779
Blog Entries: 1
Rep Power: 9
Wolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to behold
Default

OK, that would now indicate to me that your command text is incorrect in some way. What do you get when you write out the SQL command text?
__________________
Wolffy
------------------------
Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary.
Reply With Quote
  #13  
Old June 23rd, 2009, 10:40 AM
mehere's Avatar
Super Sarcasm Mistress
 
Join Date: Mar 2008
Real name: Joanne
Location: Wide Awake In Dreamland
Posts: 375
Rep Power: 6
mehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nice
Default

have you removed the double quotes and added the single quotes ...
__________________
Quote of the Month:
Mistakes: It could be that the purpose of your life is only to serve as a warning to others.

Questions to Ponder:
Why do banks charge you a "non-sufficient funds fee" on money they already know you don't have?

iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
copyright © 2008 sbenj69

Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.
Reply With Quote
  #14  
Old June 23rd, 2009, 10:44 AM
Centurion's Avatar
Barn Enthusiast
 
Join Date: Dec 2008
Posts: 352
Rep Power: 2
Centurion is on a distinguished road
Default

Quote:
Originally Posted by mehere View Post
have you removed the double quotes and added the single quotes ...
removed double quotes left it just as username, as function spud takes care of the quotes i think..

Quote:
Originally Posted by Wolffy View Post
OK, that would now indicate to me that your command text is incorrect in some way. What do you get when you write out the SQL command text?
sorry excuse my lack of knowledge, what is SQL command text?

EDIT: if you mean executing the SP in management express, then yes, i have entered the username and i get the other records showing up. so i know the username is valid and the SP is working.
Reply With Quote
  #15  
Old June 23rd, 2009, 10:46 AM
Wolffy's Avatar
Wolfmaster
 
Join Date: Mar 2008
Real name: Wolff
Location: Peoria, IL
Posts: 779
Blog Entries: 1
Rep Power: 9
Wolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to beholdWolffy is a splendid one to behold
Default

Put the following right before the rs.open and let us know what you get:
Response.Write(sql)
Reply With Quote
  #16  
Old June 23rd, 2009, 10:49 AM
Centurion's Avatar
Barn Enthusiast
 
Join Date: Dec 2008
Posts: 352
Rep Power: 2
Centurion is on a distinguished road
Default

Quote:
Originally Posted by Wolffy View Post
Put the following right before the rs.open and let us know what you get:
Response.Write(sql)
this is what i get:

Code:
EXEC spTestEdit1 '""'"test@test.com"
Reply With Quote
  #17  
Old June 23rd, 2009, 10:53 AM
mehere's Avatar
Super Sarcasm Mistress
 
Join Date: Mar 2008
Real name: Joanne
Location: Wide Awake In Dreamland
Posts: 375
Rep Power: 6
mehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nice
Default

put in the following and run it
Code:
EXEC spTestEdit1 '" & session("username") & "'"
forget the spud function ... which as wolffy says is adding double quotes and it should be single quotes.
Reply With Quote
  #18  
Old June 23rd, 2009, 10:56 AM
Centurion's Avatar
Barn Enthusiast
 
Join Date: Dec 2008
Posts: 352
Rep Power: 2
Centurion is on a distinguished road
Default

Quote:
Originally Posted by mehere View Post
put in the following and run it
Code:
EXEC spTestEdit1 '" & session("username") & "'"
forget the spud function ... which as wolffy says is adding double quotes and it should be single quotes.
ok, it still takes me to the ELSE statement...
Reply With Quote
  #19  
Old June 23rd, 2009, 11:06 AM
mehere's Avatar
Super Sarcasm Mistress
 
Join Date: Mar 2008
Real name: Joanne
Location: Wide Awake In Dreamland
Posts: 375
Rep Power: 6
mehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nicemehere is just really nice
Default

not understanding that ... but as wolffy also mentioned ... you should run stored procs using a command object. have a look at ASP and SQL Server store procedures for how to do this.
Reply With Quote
  #20  
Old June 23rd, 2009, 11:08 AM
Centurion's Avatar
Barn Enthusiast
 
Join Date: Dec 2008
Posts: 352
Rep Power: 2
Centurion is on a distinguished road
Default

Quote:
Originally Posted by mehere View Post
not understanding that ... but as wolffy also mentioned ... you should run stored procs using a command object. have a look at ASP and SQL Server store procedures for how to do this.
will that solve the problem though? in your opinion?
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
SQL Job or stored procedure todd2006 SQL Development 5 February 11th, 2009 02:20 PM
stored procedure todd2006 ASP Development 7 February 5th, 2009 03:02 PM
stored procedure todd2006 Microsoft SQL Server 1 February 5th, 2009 01:25 PM
If statement stored procedure peebman2000 SQL Development 32 May 23rd, 2008 03:54 PM
Dynamic Stored Procedure jmurrayhead Microsoft SQL Server 16 March 26th, 2008 11:19 AM


All times are GMT -4. The time now is 10:58 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2