Asp classic Converting Connection string to SQLOLEDB

Connection Code: set conx = Server.CreateObject("ADODB.connection") conx.Open Application("connectionString") set cmdx = server.CreateObject("ADODB.command") cmdx.ActiveConnection = conx cmdx.CommandText = "dbo.sproc" cmdx.CommandType = &H0004 set rsx = Server.CreateObject("ADODB.Recordset") cmdx resarray = rsx.getrows This connection string works: connectionString = "DRIVER=SQL Server;UID=User;Address=;Network=DBMSSOCN;DATABASE=Database;SERVER=server;Password

Asp classic Find out the real file type

I am working on an ASP web page that handles file uploads. Only certain types of files are allowed to be uploaded, like .XLS, .XML, .CSV, .TXT, .PDF, .PPT, etc. I have to decide if a file really has the same type as the extension shows. In other words if a trojan.exe was renamed to harmless.pdf and uploaded, the application must be able to find out that the uploaded file is NOT a .PDF file. What techniques would you use to analyze these uploaded files? Where can I get the best information a

Asp classic Get virtual path for a full path in asp classic

How can I get the virtual path for a full path in ASP classic. Note that the full path may be under a virtual directory and therefore the simplistic virtPath = Replace(fullPath, Server.MapPath("/"), "") method will not work. Edit: To clarify, an example follows Full Windows File Path (known): \\MyServer\MyShare\Web\Site\Logs\Test.txt My Website has a Virtual directory called Logs that Points to \\MyServer\MyShare\Web\Site\Logs\. Virtual Path (unknown): /Logs/Text.txt Http path (unknown,

Asp classic Intermittent ADO Recordset object error in Classic ASP script

I'm very infrequently seeing the following error logged on a website I manage: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another When I access the classic ASP page myself, I cannot duplicate the problem. Notably, the user agent is nearly always: ia_archiver (+; The script is a product search page, which uses rather standard ASP paging. The relevant code looks like this: ..

Asp classic Classic asp problem

I have this problem with my .Asp file. I get an error saying 'GetFrontpageInfo' is undefined. This is the code: click "view source" to see the code. TY

Asp classic This array is fixed or temporarily locked(in asp)

I want my multidimensional array to be dynamic, when I am trying to do that using reDim i am getting the error "This array is fixed or temporarily locked:refArr ", Following is my code: max=10 dim refArr(10,2) dim i i=0 while not rs1.eof max=max+1 redim refArr(max,2) niftyChange=0 refArr(i,0)="niftyDate" refArr(i,1)="temp" i=i+1 rs1.movenext wend

Asp classic Splitting a string in ASP Classic

So here's my string: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam elit lacus, dignissim quis laoreet non, cursus id eros. Etiam lacinia tortor vel purus eleifend accumsan. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque bibendum vestibulum nisl vitae volutpat. I need to split it every 100 characters (full words only) until all the characters are used up. So we'd end up with: Lorem ipsum dolor sit amet, consect

Asp classic PNG won't display in classic asp site

I've got an ASP page and try to show the FF logo image on it and it won't display. It won't even show if I copy it local; only seems to be this particular PNG file: <p><img src="" alt="Spread Firefox Affiliate Button" /></p> Page URL: It was ... It was ADBLOCk!

Asp classic IIS6, VBS & XMLHTTP: Execute Access Denied

I've got a VBS file that is pulling XML from our website. It going to run on our local server once it is finished. Te problem I'm having is that when I run the file on my workstation (Running IIS6 on XP SP3), I get the error: "Execute Access Denied: This Virtual Directory does not allow objects to be executed." I'm opening the file from my desktop, so I understand there's a security parameter that needs to be changed to allow executables to have access to XMLHTTP. How do I fix this? Functio

Asp classic asp ERROR MESSAGE

How I can solve this error message Microsoft VBScript runtime error '800a01a8' Object required: 'lUATRef' /cmgtest/transaction/viewPCReqForm.asp, line 284 this is some source code that I wrote below function checkUATReq(aUATRef) Dim correctness,lUATRef,uatRef correctness = False lUATRef = aUATRef uatRef = lUATRef.Substring(1,2) rwriteln uatRef 'sqlCheckUATReq = "select * from PC_DETAIL where ID ='"&uatReqRef&"'" 'rwriteln uatReqRef End

Asp classic Memory Leaks in a Classic ASP application

I have recently inherited the maintenance of a classic ASP website, I've never done classic ASP before, so please forgive me if I'm asking daft questions. My co-developers have already been through each and every page to make sure that sql connections are closed, collections are emptied and then set to null. However, it's a large site, clearly between us we've missed something. I have a dump of the process when it was leaking (taken by debug diag). When I use debug diag to perform it's memory

Asp classic CWBZZ5008 Security error occurred when attempting to connect to system

We have an ASP Classic legacy web application, which is hosted in Windows Server 2003 in IIS, that connect in our database server, which is an AS/400. We've just currently upgrade our database server from v5r4m0 to v6r1m0, so we install an update in our Web Server to connect to the new database server and change all the connection string to the proper database server. We have this code in our ASP Classic site: set objConn2 = server.CreateObject("ADODB.Connection") connStringGloba

Asp classic Client side trouble when calling

Please use my previous question as reference. I have marked an answer already. Question I'm a .NET developer doing some work for a company that uses Classic ASP. My experience with server side development is VB.NET or C# with some sort of MVC pattern. Consider the following code snippet, I wrote it in an ASP page the company would like to keep and "include" in other pages where this web call would be needed. Kind of like a reusable piece of code. I've left some out for sanity reasons. //Crea

Asp classic Error reported on a blank line

I am truly stumped this afternoon and have done quite a bit of searching to no avail. I am getting the error "Object doesn't support this property or method /admin/Upload1_20120508JB.asp, line 91" From the following code: 90 wf = fso2.CreateTextFile(sWriteFilePath) 91 92 If fso1.FileExists(sReadFilePath) Then ... Line 91 is blank and Line 90 works as expected, the file gets created in the proper location. Has anyone seen anything like this before? If so, what was t

Asp classic What is <% used for in Basic?

I am maintaining some legacy Visual Basic ASP code and I keep seeing <% ...code here... %> and I do not understand what this is used for. It seems to be some sort of blocking method but I cannot be sure and Google has been of no help because it is an odd search string. I realize this is a very "basic" question but any quick answer would be great.

Asp classic Cannot download files with classic asp iis 7.5

I am working on a clients website that is coded in classic asp with iis 7.5 and windows server 2008 r2 installed on the terminal server. The problem I m experiencing is when a user tries to download a jpg file. The code is fine and was working prior to them changing servers, but now when you click the download link you get one of the following pages: The connection was reset ( Firefox) Connection closed by remote server ( Opera ) Internet Explorer cannot dis

Asp classic Random number and database check

I'm having some issues generating a unique ID, and also checking to make sure that the generated ID is not already in the database. I wrote two simple functions, but every time they run, I get an out of memory error. Is there a better way of doing this? Here is my code: uniqueID = getID() function getID() Dim id : id = getUniqueID 'simple random number generator if checkForID(id) = 0 then return id else id = getID() end if end function function checkForID(id)

Asp classic Automatically change Page after 10 Seconds (ASP Classic)

I have an Active Server Page, which displays Booking of the current Day. I setted the PageSize to two, so my display is displaying just 2 bookings per side, if there are more Records. So actually i have 8 bookings in my Recordset, so my ASP creates 4 Pages. To illustrate it, i have done a snapshot. Display As you can see, there are 4 Pages and i can switch between them. With > i get the next two bookings and with < i can get the previous two bookings. What i need desperately is a aut

Asp classic "Microsoft VBScript runtime error '800a000d' '800a000d'

I have the next code, which works as follows: Receive some parameters from an url Insert this data into a table called clients Then I select the last data introduced in the clients table At last, it tries to insert this data into another table called users. But I'm getting this error: "Microsoft VBScript runtime error '800a000d' '800a000d' Type mismatch: '[string: "INSERT INTO galileo."]' /createClient.asp, line 50 The line 50 is this one: <% Dim insertaUsuario Set insertaU

Asp classic using recordset in classic asp

I am trying to fetch data from database using recordset with following code in classic ASP .I am using windows 7 32 bit OS: <% dim con,rs set con=Server.Createobject("ADODB.Connection") con.Provider="Microsoft.Jet.OLEDB.4.0" con.Open "c:\inetpub\wwwroot\New folder\123.mdb" rs.Open "select * from student",con for each x in rs.fields response.write( response.write("=") response.write(x.value) next rs.Close con.Close %> error is: Microsoft VBScript runtime error '800a01a8' Object

Asp classic Log execution time of each statement in classic ASP file

I am dealing with a horrible set of classic ASP files with no existing logging/auditing capabilities. I desperately need to identify performance bottlenecks in the code but there are too many places to log in the code. Even worse, due to the way the site is structured (it depends on other sites and a particular instance of an application), I cannot debug the site. Is there any way to audit the time elapsed between each execution step (ie Step Over) in the execution of the ASP interpreter?

Asp classic ASP using GetObject to invoke ADSI methods

I have a classic ASP site running under a domain account application pool context, which is using windows-auth for the front end user validation. The code is able to query AD via LDAP and ADSI just fine, however when trying to obtain an object reference to something like a computer object using GetObject, it is unable to do so. I read this [] but I'm confused about why it doesn't seem to work under the application pool context when the account is (a) a dom

Asp classic ASP classic - alternatives to enabling parent paths when installation directory unknown

I'm continuing development on an ASP Classic web application. It makes heavy use of virtual directories to serve the core application to multiple users on different websites. In order that these users have a choice of where to install the application (root or otherwise) parent paths are enabled so that relative server side includes can be used without using the root notation and virtual includes. So if I am in the administrator virtual folder and need access to a functions file or something I u

Asp classic Recursive database call in ASP classic

I am using ASP Classic and I want to have real time label on my page indicating how many users are currently using my page. Scenario: I have this label: Current # of Users: 53 ---> 53 being the real time label and I want it to update itself when someone comes in or out. They say it's called Recursive function,but I have no idea how I should do this. Please help. Thank you.

Asp classic Hidding a field if statement is true or false

I have two buttons on a page which i'd like one to show if the statement ireturn from a recordset is true else hide if false. for example if answer = boy the show button should show up else the don't show button should show. <input type="submit" name="button3" id="button3" value="Show" /> <input type="submit" name="button3" id="button3" value="Don't Show" />

Asp classic Classic Active Server Page don't need SMTP server to send email?

This is my first time dealing with Classic ASP, and I have some questions on sending email with Collaboration Data Objects. In .NET, when we need to send email, we need to include the SMTP server in the email object. But in classic ASP, I found out that it doesn't require a SMTP server to send email. (my reference : My questions are: 1. Why and how the email sending with CDO doesn't need SMTP server? 2. If it doesn't need SMTP server, how the em

Asp classic Classic ASP XMLDom read Root Node Name

I receive this xml text <InsertProductsRequest> <ProductsContainer> <Product> <ProductCode>AB25E</ProductCode> <Description>Good Item bla bla...</Description> <Price>25.5</Price> <Currency>EUR</Currency> ...... <ShippingService>DHL</ShippingService> <ShippingService>TNT</ShippingService> </Product>

Asp classic Is there a maximum number of INCLUDES in a Classic ASP page?

I'm making some updates to a Classic ASP page and I've noticed that when I add a lot of INCLUDES (ie. <!--#INCLUDE FILE="Foo.asp" -->), I get a generic "HTTP/1.1 500 Server Error" displayed in bold on the page. This is notable in part because I normally get detailed error messages (error, file, line, etc.) I've checked that none of those INCLUDES have errors. It seems like it has to do with the number of INCLUDES or the fully compiled size of the .asp file. Is this something I can fix

Asp classic CDO.Message To and From Fields Changed to "Friendly Name" and Email Address

When I first created this Classic ASP script, with the help of W3Schools, to send email, it worked fine. Now I'm having issues with sending the actual email; it appears to hang on the .Send method. I noticed that when I set the To and From email address to just the email address, it reformats it to a "Friendly Name"/Email Address format: myMail.From="" Response.Write myMail.From The output of the Response Write is: "" <> I

Asp classic what's the difference between <% %> and <script language="vbscript" runat="server"> in classic asp?

I couldn't find much documentation on the web so far now, the obvious difference seems to be that you cant mix html and vbscript using the "script" tag for example, this is ok <% public sub display_literal() %> literal <% end sub %> but with the script tag you should <script language="vbscript" runat="server"> public sub display_literal2() response.write "literal2</br>" end sub </script> on this page it s

Asp classic Classic ASP: Best way to read & write large (5mb+) files using FileSystemObject

All, I'm working on an application that allows authorized users to upload Excel spreadsheets to our server. Once they're uploaded, there's a classic ASP script that reads the data in the Excel spreadsheet, does a bunch of validation, parsing, and manipulation, then writes the modified data to a tab-delimited text file. Then, it kicks of a stored procedure in SQL Server that uses 'Bulk Insert' to load the data into a database. The whole process works reasonably well when the files are small.

Asp classic Classic ASP Add Events to Outlook

Hey Im looking to add a button next to my Events where they can add the event to outlook as a reminder from google I have found this can be done by .ics files ? Has anyone any experience with this and some sample code perhaps on how this works ? Thanks

Asp classic ASP Classic - "Content-aware" links within an included document

I'm currently re-designing a site utilizing what appears to be relatively limited ASP scripting. The site contains many articles. I've gone ahead and built a "toolbar" that will be added as an #include in each article, and this toolbar contains a list of "Share this page" links pointing to various social networking sites. For testing purposes, I've gone ahead and used absolute URLs, but I would now like to utilize this toolbar on other articles. My question is this: how do I make these "Shar

Asp classic msxml3.dll error '80072ee2' in ASP Page

We have just moved to a new dedicated server that has Windows 2008 and SQL Server 2008. I am trying to access an ASP page on the same server using Server.CreateObject("MSXML2.ServerXMLHTTP"). On our previous 2003 server this worked correctly, however with the new 2008 server the operation just times out. Here is the code: strURL = "" & MemberID & "&sid=" & cSession.SessionID Set oXMLHttp = Server.CreateObject("MSXML2

Asp classic If / Else condition with OR clause not working in Classic ASP

I am checking if condition in Classic ASP but its not working properly. Here is the code that isn't working: <% If (Request.QueryString("Cat")="") Then %> <a class="home selected" href="/" alt="Home"></a> <%Else%> <a class="home" href="/" alt="Home"></a> <%End If%> This displays both anchor tags but I want to display only one from both. Please give me suggestions on how to fix it.

Asp classic Where to get this browser info?

I'm working on some logging functionality for a website, and I need to update a table with information about the users' browser info. The table was created a while ago by someone else, and I have no idea where they were getting this info. Does anyone recognize this? (each line is a single row) Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB0.0; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727) Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; FunWebProducts; FBSMTWB; SIMBA

Asp classic Classic ASP Response.Status 500

How do you throw a correctly formatted Status 500 error in classic asp. I understand that Response.status = "404 File Not Found" is the correct way of handling a file not found exception but, "500 Internal Server Error" is not working when i thought it should.

Asp classic Type mismatch: 'Server.HTMLEncode' ASP

I need to encode the content of a record and i'm using this code: If(rsScadenze("testo") <> "") Then myString = rsScadenze("testo") 'this is a result of a query myEncodeString=Server.HTMLEncode(myString) 'here there is my error Can someone help me? Thanks

Asp classic Maxmind GeoIP city javascript

I'm trying to implement tha javascript webservices from Maxmind GeoIP City , like described here, but they say: In order to use this JavaScript on your website, please link back to the website I can't use a link in my code because i need to use a server script to check the city, so I wnated to use some trackback method... but i'm not exactly sure about how to do that. P.D.: I use Classic ASP in the server. Anyone can help me with that?

Asp classic Classic ASP : what's wrong with my code to convert quantity from dozen to piece (eg. 10.3 dozen = 123 pieces)

What i want is to retrieve quantity in database from piece and covert it to dozen. Then input as dozen and convert back to pieces and save to database again. when I input data eg. 10.3, it should convert to 123 piece for me ((10 * 12) + 3). My code work well without my "If clause" but only when data was "single" type. It made error when I input integer number, so I added "If.." statement to check it first which is now the output was correct for Integer but incorrect when I input single number.

Asp classic Mailchimp Classic ASP endpoint error

I'm using a method illustrated here: I am using a correct API Key and ListID - However, when running the script I am getting the following response: "You must specify a email_address value for the listSubscribe method -90" I've searched and mailed their support but had no reply back as yet. Has anyone had a similar issue - any thoughts on it there's a parameter missing? Cheers. Heres the code from the Mailchimp ex

Asp classic Populating an RSS feed with our database content?

I have a question about creation of an RSS feed. I have read a few different bits of information on creation of an RSS feed and this, on the whole doesn't appear too difficult. What I'm struggling to understand though is how to automatically populate the RSS feed xml file? Here is our basic .xml file... <?xml version='1.0' encoding='utf-8'?> <rss version='2.0'> <channel> <title>Channel Title</title> <description>Description of Channel</description>

Asp classic Classic ASP - Detect line number and file from which a function is called?

Our application is made in good (?) ol' classic ASP. Not ideal but it works and it's pretty stable - has been for 10-15 years. It is not particularly well documented in places, such as where a 'translation' (client-controlled piece of text) appears. All we have against a translation is a clientid and translationid, neither of which are particularly helpful. I've tried searching the (10s of thousands of lines of) core code for gettrans(1) (translation 1) and can see that doing this for another 31

Asp classic Getting Error 800a0e7a "Provider cannot be found. It may not be properly installed."

So I am going back to a project I created in College, so I can transfer it to PHP. I orginally coded it in ASP Classic. I am on Windows 8 and running Access 2013. I am currently getting the following error ADODB.Connection error '800a0e7a' Provider cannot be found. It may not be properly installed. /PROJECT!Better/verifyuser.asp, line 11 and this is my connection string code. Dim vPath, pPath, Conn vPath = ".\db\Comic.accdb" pPath = Server.MapPath( vPath ) objConn = "PROVIDER=Microsoft.A

Asp classic How can we call user defined function from classic asp

I have a query like this select distinct mydb.getprodsizecolor(idProduct,'%color%') as icolor from products I am calling this from my asp page and its working fine, I have to store '%color' in a variable like desc = '%color%' But when i execute query like this, it errors out select distinct mydb.getprodsizecolor(idProduct,desc) as icolor from products can any one help ?

Asp classic Classic ASP calculation works on IE+ Maxton computer not on Phone's Chrome & Dolphin

This confuses me quite a bit and I had to remove the whole code for now so the site works, but removing it makes the site look bad. This code works perfectly on my computers IE and Maxton Browser. On my Samsung phone's Chrome and Dolphin browsers the result from row 1 is nothin (""). Row two doesn't work either. I thought all these calculations are done server side, so whatever browser or gadget I use should not make any difference at all? Still it does. '################# Remove www. #

Asp classic Classic asp - how do I reload a page?

I am trying to reload a classic .asp page after a user does an update via a form. The page contains about three screenfuls of information. The update works perfectly well, but I'm aiming to have the updated page show at the same point where the user left it, just before performing the update. I am using this : Response.Redirect("viewstudent.asp") This does reload the correct page after the update, but the user has to scroll down to the place where he started from. Is there any way to make

  1    2   3   4   5   6  ... 下一页 最后一页 共 13 页