Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Grumpy
Beginner


Joined: 24 May 2004
Posts: 10

PostPosted: Thu Sep 28, 2006 2:09 pm   

Problem inserting into Database
 
I current insert into my database (SQL Server) through the use of recordsets, like:

Code:
#VAR rs("Name").Value @item.name
#CALL @rs.Update


but whenever the item name contains special characters like / or ' etc. I get an sql error. I can enter the information manually fine so it is not a type mismatch. Does anyone know how to fix this problem?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Sep 28, 2006 11:06 pm   
 
You have to add an escape character before those special characters. You can do this with %replace.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net