asp-classic

Set “Required=False” in VBScript to MS Access file

◇◆丶佛笑我妖孽 提交于 2019-12-13 18:12:48
问题 I found a really nice example on how to take data from a classic ASP file and spit it out to a new MS Access file. My one problem is I need to set the "Required" property of a column to false so that if no data exists for that column, it won't crash. Googling gets me results with different syntax and it doesn't seem to work. If some can help me set the property with this example, I'd appreciate it. dim provider : provider = "microsoft.jet.oledb.4.0" dim db : db = "c:\Documents and Settings\**

pagination classic asp, and button changed to hyperlinks

时光怂恿深爱的人放手 提交于 2019-12-13 17:20:04
问题 I've created buttons that have been edited with css to look like hyperlinks so I can use form post instead of using querystring. I've made it so that when a button is clicked it creates a checkbox for each user. I want it so that when i change the state of the checkbox I want it to save as I'm going through different letters. I believe the problem I am having is because the "hyperlinks" are really buttons and changing the checked state of a checkbox is creating problems. I would prefer not to

%2B decoding to a space instead of a plus

▼魔方 西西 提交于 2019-12-13 17:19:57
问题 We have a problem in a specific server. All plus signs posted to the application are replaced with spaces - that's in POST and GET, and on all pages on that site. As a test case I have this little page (it's an ASP server): <html> <body> <form method="post"> <input type="text" name="Plus" id="Plus" /> <input type="submit" /> </form> Previous Value: <%= request("Plus") %><br /> Query String: <%= request.querystring %> </body> </html> On every other server this works well, but on one server

classic asp - javascript array populated by vbscript drop down list

二次信任 提交于 2019-12-13 17:16:33
问题 I need to create a javascript array which is populated based on drop down lists' (more than one) selected values, except each drop down list has the same name because they are created in a for loop. Right now I have: <script language="JavaScript"> var array = []; var e = document.getElementById("phItemStatusID").value; //returns first ddl value </script> and later in the asp code is my drop down list which is populated from a database using VBScript: <%for i = 0 to UBound(photoItemsArray,2)%>

Add spell check to my website

微笑、不失礼 提交于 2019-12-13 16:23:38
问题 I have an asp-based website which I would like to add spell checking capabilities to the textarea elements on the page. Most of the pages are generated from an engine, though I can add JavaScript to them. So my preferred solution is a JavaScript-based one. I have tried JavaScriptSpellCheck and it works okay, though I would like to see what some of my other options may be. I also found spellchecker.net but at $3500 for a server license it seems excessive. Spell checking can be in a separate

Writing JSON in Classic ASP page, and general (mis)understanding of Http Response

前提是你 提交于 2019-12-13 16:08:45
问题 I had a classic ASP page (VBscript) that generates an XML on server-side, and then Response.Writes it. The page had no client side at all. However I needed to convert it to JSON. Since I could not find an ASP server-side way that worked (whole different subject) I did it on client-side with a Javascript code I found, finally document.writing it to the page. THE PROBLEM is that the result is not the same: If before the http RESPONSE was only an XML, the response now is the javascript code,

Server Sent Event and asp classic

风流意气都作罢 提交于 2019-12-13 16:04:16
问题 I made a ASP script with all headers necessary for Server Sent Events. The client side script is working. I tested it with a PHP script and it works fine. The ASP script works and it returns the expected message if you call it from the URL line, but when the javascript calls it, the element inspector returns the data as "undefined". When I set the breakpoint to the "open" event listener, the "e.data" is "undefined". For some reason Javascript is not accepting the UTF-8 text sent by the ASP

SQL Server expecting different date format

烂漫一生 提交于 2019-12-13 15:31:10
问题 I have set the SQL Server's default language to "British". The following correctly returns 23... sp_configure 'default language' I have also set the language of my login to "British" too with... sp_defaultlanguage @loginame = 'Login123', @language = 'British' However, when I attempt to specify 13/12/2015 as a DateTime stored procedure parameter from ASP Classic, I get... Error converting data type nvarchar to datetime. From Management Studio, with the correct login, it works. Why would ASP

why vbscript Mid function shows error 'Invalid Procedure Call or argument : Mid'

假装没事ソ 提交于 2019-12-13 14:21:12
问题 Hi Below is my code of ASPClassic, in which csvData is a very large string containing variable.Now in this At line where Mid function is call error 'Invalid Procedure Call or argument : Mid' occur why this happens... Dim dataLen Dim fromLen Dim toLen Dim slab Dim totalPass dataLen =len(csvData) fromLen =0 toLen =100000 slab =100000 totalPass =(dataLen/slab) if (dataLen Mod slab)>0 then totalPass=totalPass+1 end if Dim i For i = 0 To dataLen i=toLen if toLen > dataLen then toLen=dataLen end if

SQL injection capturing on classic asp - reposting form puts in lots of ticks

心不动则不痛 提交于 2019-12-13 13:41:51
问题 I'm using SQL Server 2005 with classic ASP and on a form repost (I post back to the same page), I replace each text field as follows: course = trim(replace(request("course"),"'","''"))\ The problem with this is if I have to repost the form multiple times in case of validation errors, the tick marks I replace multiply. Is there another way to safely vet the string fields without doing this kind of replace? 回答1: you better use a parametrized query: dim cmd : set cmd = server.createObject("ADODB