Results 1 to 2 of 2

Thread: Encoding

  1. #1
    Conrad Guest

    Default Encoding

    I am trying to insert a record into a database. The problem I am having is this: when the string(taken from a form) contains special characters (&#060;&#062;?/&#039";:) the page that inserts it into the database it causes errors.<BR>Seeing how I just input those special characters into this form and the knowledge that I can look at this posting later tells me that this is fixable problem.<BR><BR>Thanks.<BR>Conrad

  2. #2
    peterjl@austec.net.au Guest

    Default RE: Encoding

    If you are trying to do this by building an SQL statement, and then executing it via the Connection Object&#039s Execute method, this is may be more efficient but I suggest the complexity of doing this way out-weighs the ease of using the slightly less efficient Recordset.AddNew method.<BR><BR>E.g.:<BR><BR>&#060;%<BR>set rs=server.createobject("adodb.recordset")<BR>rs.op en "Select * from YourTable", YourConnection, 2,3,1<BR>rs.AddNew<BR>&nbsp;&nbsp;&nbsp;rs("Field1 ")="youre string of characters"<BR>&nbsp;&nbsp;&nbsp;rs("Field2")="Any other string of chars including(&#060;&#062;?/&#039"";:)"<BR>rs.update<BR>rs.close<BR>set rs=nothing<BR>%&#062;

Posting Permissions

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