I have a problem in inputing single code(') string into the SQL database. I wrote in ASP language and connect to the SQL server to insert the data.
If the data contains single code string (e.g women's group)the syntax error appears and it stops.
I tried to change the double code(")instead of single one to insert the data and then, it also has error "does not permit column name ...." or something like that.
How can i solve the problem to input the data that contains single code(')?
I have a page that will display a list of locations from an SQL DB. Users need to be able to sort and/or search these locations by industry
Each location has a 4 character desgnation, the 3rd character of which indicates industry. How do I query the DB in an ASP page to recognize ONLY the third character in the string?
I want to write a script that will identify the string of code between two delimiters, in this case [ img ] and [ /img ]. I am using an image resize code that means i need to take the image URL and use it in two places. I need to turn:
Can I run ASP code from a string? I thought of using this method to get included files as text http://www.asp101.com/articles/mich...des/default.asp but then I need to run it as ASP.
got this code , among others (attached below) for shopping cart from a friend and it suppose to work, however it requires a connection string to make this database driven website works, so my question is how do I insert a connection string code in the string so that it will make a connection to the Access database. Code:
I have been using recordsets to access data from a database.I then loop thru each row in a dataset and assign the values to the objects on my web page.The particular sql stmt that I have right now, only returns a single value from a database. I need to assign this single value to a variable in my asp code. Can I do this without using a recordset?
If I have to use a recordset, do I just do var1 = recordset("columnname") (I ofcource create the connection object, the sql stmt and stuff first).
I have a simple form submission but the problem is my SQL insert (or update) is failing if in the text field there is any single quotes (') I tried running the like replace(textfield,"'","") to just remove them but it will still error out on me. is there any other way to format the variable, do I need to use an escape character?
I am trying to send a 'single' data type to a sql server db cell that is formatted for 'decimal' from asp/ado code and it is converting it to an integer. Should I be using some other data type in sql server?
can i delete related data from 2 tables using a single sql statement? is my code correct? correct me if i wrong. i want to delete data where user click the delete link. Code:
sqlDelete = "DELETE FROM Reservation R, Quotation Q WHERE R.resID = " & request.querystring("id") & " And Q.resID = " & request.querystring("id")
I have a table with one header, everytime I use this code (below) it returns EOF and I know for sure there is at least a zero there:Code:
set rs = server.createobject("adodb.recordset") rs.open "SELECT myonlyheader FROM mydatabase", "dsn=whatever" response.write rs("myonlyheader") rs.close set rs = nothing What am I doing wrong here?
I am looking to implement a single-sign on solution for my company's website which has many partner websites scattered around the globe.
I want the members to be inconvenienced as much as possible, so if they log into one website, they are logged into all of them. As each website exists on seperate web servers in different locations, this makes my options a little tricky.
Has anyone had any experiences of single-sign on? I only know a little of XML, but I understand that this kind of thing can be achieved using XML over SOAP.
Running into a what I thought should be a small problem but it's going on an hour and I still can't figure it out
Reading an excel file and running queries on Sheet names. The problem is when there is a single quote in the sheet name.
selectQuery = "SELECT * FROM Dave's Sheet"
I tried to use
selectQuery = "SELECT * FROM Dave's Sheet"
But that doesn't work either.
It keeps bombing the query. Not matter what I try I can't get this to work. I can't replace the single quotes because then it can't find the tab name. Any ideas?
I've got an HTML page with a series of links that are intended to search a category listing in a database.
for example
link 1 has a querystring of "?subid=Boats" link 2 has a querystring of "?subid=Cars & Trucks" link 3 has a querystring of "?subid=Men's & Women's Outerwear" etc
As long as the subid doesn't contain any single quotes or any special characters such as the "&", my SQL works ok and the records are retrieved. 'm using Request("subid") to get my querystring value.Is there any way I can escape the single quotes or other special characters in the Request("subid") so it won't break the SQL?
how i could insert data into my DB that contained apostrophes. for example, I wanted to insert Bailey's well, my SQL statement was being cut off when it hit the ' and i was getting all sorts of errors. i was writting some complex stuff to take out the ' then re-insert it when being displayed.lots of work then i thought, what if i replace my ' with " in my insert statement.
like i said, some of you may know this, but i thought id share my experience with you just in case someone runs across the same problem.
I've built an array like this and I've put it into an application:
Code: If not isArray(Application("utenti"))thenDim online(1,4)online(0,0)=4 online(1,0)=1online(0,1)=5online(1,1)=1online(0,2)=7online(1,2)=1online(0,3)=9 online(1,3)=3online(0,4)=15online(1,4)=3application("utenti")=onlineEnd if Now is it possible to modify some values in this application-array?For example trying to set the value in position 1,1 equal to 3 I wrote: application("utenti")(1,1)=3 or
I'm building a few web sites that will use distinct domain names but will reside on the same server, at the same IP address, in the same application space, and will share a database. They will each provide different content depending on the domain name, but will share some core functionality behind the scenes.
What I'd like to be able to do is have one site serve as the primary site. If a visitor comes to one of the secondary sites and wishes to perform a function that requires them to be logged in, I'd like them to be able to log in only once and then be able to visit any of the sites without having to login again. Does anyone know of a pure ASP script-based single sign-on system?
I am having a problem with a single quote in my URL. I use HTMLEncode and all is good on my machine, but when I test it with a browser from a different machine, I get 403 on invalid characters. More, it seems to me that the URL gets truncated after that single quote that I have in my URL.
Access 2000 doesn't allow single quote when updating records from the webpage. If the user need to insert for example the name O'neil in a field it will create this error:
is it possible to read single characters from text files with ASP i have seen codes which read entire lines or entire text....but i couldnt find any function which reads single characters as the text file is read...
I have a rather basic question. I have a simple username and password front end that queries a SQL database, I run into problems when one of the user names has a single quote in it (IE: O'brian).
I get the "Microsoft OLE DB Provider for SQL Server error '80040e14' Line 1: Incorrect syntax near 'brian'." error message, any clues on how to display those particular cases? is there anything in particular that should be done to my SQL statement?
I have a code that goes to the url of the company.My problem is that if a company name has a single quote in it,it tries to end the statement.I tried a replace as you will see,but still doesn't work.Heres my code:
I am building a db driven website which lends itself to a single-page approach. I have a function which creates menu and sub-menu items and calls in the appropriate content to the page by referencing a content id number.However there are some pages that do not lend themselves to the standard page template i.e. contact us and would be better as entirely different asp pages.
can i put something in the content id field in db that breaks out of the template by redirecting to a different asp page? I thought a response.redirect might do it but this just prints the actual syntax onto the page.