Can someone explain this:
-----------------------------------------
CQuantity = 8
if 4 < cQuantity then (works)
-------------------------------------------
'Get Record Count of This Type of Property
set rsProp1 = server.createobject("adodb.recordset")
rsProp1.pagesize = 1
mysql = "select * from Property where PropTypeID="&cAccomID
rsProp1.open mysql,cn,3,3
response.write(rsProp1.recordcount) >> = 4
if rsProp1.recordcount < cQuantity then (DOES NOT WORK!!!! QUANTITY IS STILL 8)
whati have is a table that alternates colour each row so making it easier to look at the info. I also have it to check so that if the stock level is below min change from standard to red.
I also want it to check now so that if it has been ordered instead of being red green instead. i thought this would do it but i dont know how to check database to see if the check box is ticked. Tried Yes/No True/False and even both "yes" or "true" and so on. Code:
I'm having some trouble implementing this IF statement in a ASP page. The problem is that it doesn't recognize this statement and it's publishing it like there's no IF in the code.
It never writes the code inside the IF. And yes... I'm sending it the variable "var_id".
I have been using Dreamweaver to produce an ASP site uploading to an Access database and have hit a bit of a problem – one which has made me re-evaluate how I make sites.
I think it is time I stopped relying on Macromedia and started learning proper hand coding.
My problem is this:
I am uploading an image to a folder on the database, and from the same page trying to insert records.
The upload image works fine, the script is all ok.
It’s the insert statement I cant get to work. The SQL is sound, I’ve tested it in Access itself, but the problem is, that without the help from Dreamweaver, what is the syntax to execute the command?
I'm simply trying to get a number of records returned in a recordset, and just get a -1. I have looke din a few books and other references, can't seem to find any answers. Anyone have any idea why I can't get a real number? For the record, the recordset is not empty. In fact, it has many records which I can see plainly on the screen. But when I do response.write rs.recordcount, it just shows -1
i tried using a few method from the forum and fail. So anyone can help me out with this, i wanted to count the total number of record in the on of the table Namecard, so tried this code but fail, anyone can help me out? Code:
Our application currently runs on aWindows 2000 Advance server with Oracle 8i and Microsoft IIS 6.0. We are changing servers and will now be running a Windows 2003 server with Oracle 8i and Microsoft IIS 6.0.
The .RecordCount property does not work on the server. It returns a -1. We have not changed any code.
Any idea why this would happen? Are there certain parameters that have to be set to get the .RecordCount to work?
I have an ASP page calling a VB COM calling an SQL Server stored procedure. What I would like is to return a recordset to ASP (works fine) and obtain the RecordCount (doesn't work). The problem seems to be the difference between adOpenForwardOnly and adOpenStatic of the recordset (adOpenForwardOnly is default and doesn't support RecordCount). Unfortunately, I'm unaware of how to specify adOpenStatic for the recordset. I've seen the "RS.Open SQL, Connection, adOpenStatic, adLockReadOnly" method, but my recordset is populated by a stored procedure "Set objRS = objCmd.Execute" ... any ideas how I can obtain the RecordCount (short of having the stored procedure return a count)? Also does it matter where I specify the adOpenStatic (ie, in VB COM or ASP)?
I've like to check whether the recordcount equals 0, 1 or greater than 1. I'm still getting to grips with ASP, but hope this isn't too hard. Coming from CF background - have sussed out conditional stuff in ASP, but need to do recordcounts for validation.
to count total records in rsnews table, how do i change this to count not all the records, but count the records that has a certain field with a value in it? ie:
I'm using multiple recordsets on a page, and they are all returning correct results and enough of them. My problem is when I try to access the recordcount property rs.recordcount, they all return a result of -1. This would usually mean that no records are returned. So why is showing my recordsets that are displaying records with recordcounts of -1. I can't seem to figure out.
even though the db has pulled at least 10 records... i cant figure it out... it has broken alot of my code.. and i've been forced to find different means of making the same code work in asp that i could write quickly in php. i'm trying to learn asp now, and i'm just having problems with this..
I searched the web for this, but couldn't find any reason as to why this was happening to me. I have a database set up with one record in the students table. I just issused a query "SELECT * FROM students" to test my DB. When I try to get the number of records with adoRS.RecordCount, it returns a -1.
Code:
set adoConn = Server.CreateObject("ADODB.Connection") set adoRS = Server.CreateObject("ADODB.Recordset")
My company is in the process of moving servers and I am one of the developers in charge of making sure it runs smoothly. Currently, we are on a Linux server that runs Chilisoft ASP. We are moving to a 2003 Server with IIS6.Several of our scripts use the recordcount property of recordsets.
On the new server, recordcount seems to be shaky. We have managed to get it working on one of our websites fine, but on another site on the same server it does not. Both sites are configured in the same manner. We did have to add "objConn.CursorLocation = adUseClient" before opening each connection, which made it work for the first site, but adding the same line of code on the other site seems to have no effect.
why a ADO recordset.recordcount would return a -1? I have confirmed that it has records in it by writing some values to the screen. Why can't I count the number of records returned though?
i am trying to count the records in an access database, and i cant seem to figure out the syntax to count the records and output a response.write with the number.
I'm opening a recordset with a SQL statement and then trying to use the .RecordCount property to count the number of rows in the recordset. For some reason, it is always returning -1. Code:
I'm having trouble with the recordset object. I'm trying to use the "RecordCount" aspect of the recordset but it keeps diplaying "-1". How do I get it to show the total count of records?
The problem is that I can run the ASP files in the wwwroot folder when I use http://localhost from my browser or RUN (and that's for the default.asp). But the asp files do not work when I call them from a hyperlink in an HTML file.
After I moved the site to new server the mailing method stoped working , the cdo pull the email from sql database on the same server .. although it says sent to # recipients. I send a webpage (newsletter) exisit on the server "I use full url" also the registration page gives when registration the error: CDO.Message.1 error '80040218'
Unknown Error
/extra/news/reg3.asp, line 251
line 251 is objSendMail.CreateMHTMLBody "http://www.example.com/newsletter.html" I saw description of the error it sayes that I have to use full url ...but I am using it ... any Idea ...