+ Reply to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 39

Thread: Recordset and Stored Procedure issues!

  1. #11
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    removing the double quotes still sends the page to the ELSE statement...

  2. #12
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    1,037
    Blog Entries
    2
    Rep Power
    13

    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.

  3. #13
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    436
    Rep Power
    7

    have you removed the double quotes and added the single quotes ...
    Quote of the Month:
    Leaders: Leaders are like eagles. We don't have either of them here.

    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.

  4. #14
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    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.

  5. #15
    Wolfmaster Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy is a splendid one to behold Wolffy's Avatar
    Join Date
    Mar 2008
    Location
    Peoria, IL
    Posts
    1,037
    Blog Entries
    2
    Rep Power
    13

    Put the following right before the rs.open and let us know what you get:
    Response.Write(sql)
    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.

  6. #16
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    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"
    

  7. #17
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    436
    Rep Power
    7

    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.
    Quote of the Month:
    Leaders: Leaders are like eagles. We don't have either of them here.

    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.

  8. #18
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    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...

  9. #19
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    436
    Rep Power
    7

    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.
    Quote of the Month:
    Leaders: Leaders are like eagles. We don't have either of them here.

    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.

  10. #20
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    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 to Thread
Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO