I'm passing a string (the file name of a photo) from a database, into a
hidden form field, and then posted from that form into the HTML code of
a multipart e-mail being sent by CDONTS.
The weird thing is that right before this string is inserted in the
<IMG> tag of the e-mail, the file name is altering slightly, but enough,
of course, to break the link. I can even take that same variable to
which the string is assigned and write it in the text of the e-mail
message and it comes through fine. Code:
When the cursor is in an INPUT TEXT control and the Enter key is hit, what it's happen. I mean what is the chain of actions starting from that point.
I have an ASP application that save modifications (qty chang in an input text) when the user navigate from page to page. For doing so I check if the value of the TEXT control differ from the value in the table. If so, I insert or update the table. But, when I hit Enter it is exactly the same as if I moved to another page. I would like to know exactly what's happen, in order to take advantage of this behavior.
I'm running ASP under IIS 6 with Tomcat. During the process, Tomcat will forward to an ASP page with some data and those data will be written to MS SQL and display some information in that particular ASP page. The Servlet has no unsafe code. The strange thing is that all the data is written correctly in the MS SQL with correct user and related information but the data might become blank or send to different users in that ASP page.
Does anyone know what might cause this strange behavior ?
I know this is actually impossible, but didn't know how else to describe it: I have created a Content Management System for a client using ASP connecting to a Access database. It doesn't do any fancy things: INSERT, UPDATE, etc. I also use ASPUpload to upload images onto the server.
When I test my CMS from my own machine and others, it all works fine. However, testing it from my client's machine, the Updating or Inserting of data ends up returning a 'page not available' error (the asp page calls itself when the form is submitted) and the changes to the database are not being executed.
I really can't figure out why this is happening. Could it be a setting on the client's browser?
On a remote server running W2K and thus IIS 5 I have session variables declared in a global.asa file in the root of the application which are passed and visible on all pages with no problem. This was also the case on my localhost before (127.0.0.1), also on W2K / IIS 5. But now for some reason one variable doesn't pass through at all and the other is taken as a String on the localhost.
The problem area in question in my Global.asa file (which is identical on the remote and local servers)
<script language="vbscript" runat="server">
Sub Session_OnStart CInt(Session("indx"))=0 CInt(Session("total"))=0 ... End Sub
I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.
The following code snippet works for me: tokens = "one,two,three,four".Split(",") for each token in tokens response.write("<td>"+token+"</td>") next
However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).
I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....
I have a form in which several elements are expected to be all digits. Some of those elements can be left empty, but if specified they must be all digits. I have this Sub to edit them: ....
I am pulling info from a sql server By default the query pulls back the inforamtion as text.Therefore when I go to calculate some figures its giving me a type mismatch error. Is there a function in can call to convert a text string to an integer string using
rstSearch.Fields("name").Value .To pull back the info in a for loop
Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch
If a visitor doesn't put anything in the "Search" text box I'd like them to be redirected to where they came from before the search form forwarded them to the search.asp page. Therefore I've put the following at the top of search.asp to do this.
I am trying to search my access database for a string using LIKE and a wildcard. Example:
Code:
Dim con
con = "SELECT names.* WHERE name LIKE 'sam*'"
For some reason this gives me no results even though I verified there is entries with the word sam in them.
Also tried using % instead of *. Also took out wildcard. I can search for an integer without a problem though, when I try a string, regardless if there's relevant entries I get nothing back at all.
I am using an SQL statment with a LIKE clause. I am trying to print the actual SQL statement on the screen. However I cannot print a '%' character on the screen. I tried using Chr code and just % outright.
Random variables: name, rank
Code:
sSQL = "SELECT * from myTable WHERE myField LIKE '" & name & "%'"
i need requirement for the current assignment Im working on.Part of my assignment I have to saved updated data from a datagrid and put into database. I had everything working, but without option strict and explicit. When I put it on i'm having trouble getting the value out of it.
What I need is to get the value out of the textbox control of a datagrid in edit mode. The value is supposed to be in Item.cells(2).Controls(0) but I have no clue on how to get it out correctly. Ive tried everything but keep getting errors that it cannot be converted to a string.
the subject that i need to filter the URL from a memo field that having lots of URL in it, like when we post a message with URL www.websourceinfo.com it will become a base url link with click
I searched google for this (probably easy to solve) problem, but all answerd there did not work hop someone can help me out.In an asp I want to check whether a string contains a " if so the response should be that the "-sign is not allowed.
Elseif InStr(1, username, """) > 0 then Response.Write "-sign is not allowed in the username."
Tried char(34) and /" and """ but none of these options seem to work.
This seems like it should be so simple. I would like to create a conditional statement based on the length of a string. The string is a memo field from an Access database. I would like to handle long memos differently from short ones. I'm starting out just by trying to write out the length of the string:
memo = RS("Idea_Note") Response.Write Len(memo)
I can response.write the memo without trouble, but I get nothing for the length of the memo.
I have a drop down list of ssn and text box to input ssn to view the info in the next page. I am having a problem with displaying and when I debugged the code, I am getting a comma next to the ssn. Here is my code the dropdown and input type:ssn is text field. Code:
I need to create some .asp pages to publish data from our manufacturing lines...but I can't figure out how to establish the connection string and print the data. I've been stuck on this all day and about to start pulling my hair out!!!
As an example, can someone create the most basic code necessary to build a web page that does the following:
a) connect to a SQL version of the Northwind db (assume I have a functioning ODBC connection called 'Northwind_ODBC' on a server called 'ProductionServer')
b) Loop through the records in the [Shippers] table and paste the values in a HTML table (using SELECT * FROM SHIPPERS)
I know it sounds simple but I'm looking through some books and can't find a solution that works on my server.
NOTE: I'm running Server 2003 (with IIS), SQL Server 2000, and I have proven ASP does work on this machine...unfortunately, just not with the code I'm trying to build!!!
Im trying to create a string from checkboxes that have been checked, but for some reason its not working
strNumbers = "" for each key in request.form("chkFacility") strNumbers = strNumbers + "" & key & "," intCount = intcount + 1 next
So I want to end up with a string like this '3,12,7.' Instead Im just getting a single number. Am I doing this the right way. Any help wud be just fantastic!!
City - name of city RentLow - low range of rent RentHigh - high range of rent myquery - keywords
The following is the start of my query string but I am having issues with the City portion already and I have not gotten to the rent yet
I know the SQLquery portion right below is fine - it tested perfectly, along with the rest of the query, it was when I added in the request city string that gives me No value given for one or more required parameters. even though one is passed in the string.
SQLquery = "(" &parsethis(strText ,words ,wCount, 3) & ")" SQLquery = Replace(SQLquery, "<FIELD1>", "title") SQLquery = Replace(SQLquery, "<FIELD2>", "description") SQLquery = Replace(SQLquery, "<FIELD3>", "comments") SQLstr = "SELECT * FROM links WHERE " & SQLquery & " AND city = " & Request.QueryString("city") & " AND linktype = 2 AND active = " & myTrue & " " & SortSQL & ";" end if
I'm trying to create a connect string, but I might have a unique situtation. When connecting to Query Analyzer, I connect using RUNAS specifying domain and username. Is it possible to create a connect string given the above requirements? Here's what I'm trying to use:
Here is the SQL Query string that gives me an error.
mySQL = "SELECT * From tblSuperQ Where (DCR Between '"&DCRF&"' And '"&DCRT&"') And Where (Inductance Between '"&indf&"' And '"&indt&"')"
Can you not combine Wheres together?..
If I use UNION ALL between the two where queries, it returns all the results between DCRF and DCRT, AND all the results between indf and indt. I want it to query only those that have values only in both where queries.
I am passing a string into a page and them looking up info to display from a database based on whats passed in. The link is www.domain.com/page.asp?variable='12345678' Once inside the page the following code is executed Code: