Single Record
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?
View Replies
ADVERTISEMENT
I get a "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/tourasp/town.asp, line 200 "
error when running following piece of code:
set RS = Conn.Execute(strSQL)
DS = RS.GetRows()' -- (this is line 200)
RS.close
Conn.close
set RS = nothing
set Conn = nothing
If the recordset has two or more records in it, it works fine, but if the recordset has only record in it, I get the error. Code:
View Replies
View Related
I'm getting this error message: Error Type:
Microsoft JET Database Engine (0x80004005)
You cannot add or change a record because a related record is required in table 'employees'. Code:
View Replies
View Related
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).
View Replies
View Related
I have an insert record form that posts fine to a db which automatically creates an ID how could I get the next page to do a preview using the ID just created by the DB to go to the right record?
View Replies
View Related
I have a .asp page which lists a date, then a bunch of record lines for data that falls within that date, then the next date and it's bunch of data record lines. e.g.
Ship Date: 04/06/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
Data xxxxxxxxxxxxxxxxxxxxx
What I want is:
Ship Date: 04/06/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
4: Data xxxxxxxxxxxxxxxxxxxxx
Ship Date: 11/07/04
1: Data xxxxxxxxxxxxxxxxxxxxx
2: Data xxxxxxxxxxxxxxxxxxxxx
3: Data xxxxxxxxxxxxxxxxxxxxx
How can I get these numbers printed againsts the records ?
View Replies
View Related
I'm assuming this can be done, but I can't seem to get it to work... I'd
like to easily return a single value from a sql statement, something like:
"intNewItems = conn.execute "SELECT COUNT (ItemID) WHERE ItemDate = Date()",
where conn is the connection object, etc. What am I getting wrong?
View Replies
View Related
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?
View Replies
View Related
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?
View Replies
View Related
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")
View Replies
View Related
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.
View Replies
View Related
point me to resources that will tell me more about enabling a web application to tegrate with windows security for single sign on
View Replies
View Related
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?
View Replies
View Related
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?
View Replies
View Related
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.
View Replies
View Related
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
Redim Preserve application("utenti")(1,1)
application("utenti")(1,1)=3
View Replies
View Related
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?
View Replies
View Related
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.
View Replies
View Related
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:
Syntax error (missing operator) in query expression ''O'neil', r_add1 ='Auburn', r_add2 =' ', r_city ='AUBURN', r_state ='WA', r_zip ='98001' WHERE r_id =279'.
Is there a script I can use to accept the single quote as part of a string of characters?
View Replies
View Related
I have a cookie like this:
Request.Cookies("connection")("permission")
with the value: YNNYNNYYYN
how can I get the single chars value? Y, N, N...
View Replies
View Related
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(')?
View Replies
View Related
I would like to know if I can some set a variable to return a single value
from a function using the set command. Is this possible? Code:
View Replies
View Related
what is the rule for single quotes around a value name in a strsql?
y do you have to do it sometimes?
View Replies
View Related
I'm trying to produce an image with a javascript link. The problem seems to
be with the single quote. Here is the code that I wrote:
response.Write("<a href='javascript:PopUp('http://www.yahoo.com')'><img src='image1.jpg' width='50' height='67'></a>")
When I preview the page and roll over the image, the link is truncated to just javascript:PopUp( .
I've tried creating the link with a string like below.
strLink = "javascript:PopUp(" & " ' " & "http://www.yahoo.com" & " ' " & ")"
The string displayed properly when printed on screen, but when I tried to use it as the link it truncated again. I'm not real sure what to try next.
View Replies
View Related
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...
View Replies
View Related
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?
View Replies
View Related
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:
Response.Write "<td><center><a href='edit.asp?company="
Response.Write server.URLEncode(replace(rs("Company"),"'","'"))
Response.Write "'>Edit</a></center></td>"
View Replies
View Related
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.
View Replies
View Related
I have a single Include file that I want to use on multiple sites. I'm trying to use the
following (or some variation) but can't make it work.
<!--#INCLUDE FILE="www.myothersite.com/FavLinks.inc"-->
View Replies
View Related
i need when a user is logged in, his or her account is locked and no other ppl can login by using these account.
View Replies
View Related
i want to place single quote in customer name. how?
View Replies
View Related
Just wonder how you guys handle the single quatation marks when you write the value of a text input into SQL server.
View Replies
View Related
Could someone explain when to use double and single quotes? I'm having a problem with an insert statement and I think it may be the quotes. The error I get is a sql syntax error.
Here is the sql statement:
strSQL = "INSERT INTO [Members] (Website, email, category, phone_no, fax) " _
& "VALUES ('" & web & "','" & mail & "','" & cat & "','" & phone & "','" & fax & "')"
The values are variables. I checked the input statements first then assigned to variables. I hoped it would make the sql statement easier for me too read. Also does Access accept null?
View Replies
View Related