Adding data to DB

Results 1 to 2 of 2

Thread: Adding data to DB

  1. #1
    Join Date
    Dec 1969

    Default Adding data to DB

    I am trying to add some values to a database, nothing unusual there.<BR>However one of the values is a decrypted value in the form:<BR><BR>[code language="vbscript"]<BR>My Decrypted text is: &#060;% = Decrypt(Request.Form("my_encoded_field"),session(" D"),session("N"))%&#062;<BR>[/code]<BR><BR>How can I carry this value into a database using a sql statement?<BR>Can I assign a varibale name to it?

  2. #2
    Join Date
    Dec 1969

    Default The code you posted here... nothing other than:<BR><BR>Response.Write Decrypt(Request.Form("my_encoded_field"),session(" D"),session("N"))<BR><BR>Now, Decrypt() is a function which returns a value. You can assign this value to a variable if you like, or just concatenate it to a string, or anything else you can do with any value or variable.<BR><BR>I assume you&#039;re very new to ASP, because you&#039;re question is very basic. Therefore I will give you a little clue here:<BR><BR>Dim sMySQL<BR><BR>sMySQL = "SELECT Field1, Field2, Field3 FROM MyTable WHERE Field1 = " & MyFunction(1234) & ";"<BR><BR>Oliver.

Posting Permissions

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