I am trying to make my update page work, but when i submit the form it comes with this error "mismatch in criteria expression" and the problem i think lies on one of my menu list that is joined to another table in the database.
Noob question I'm getting errors with the following code
Code:
processevent = Request.QueryString("processevent") SQL = "Select * From shimlog Where ID = '" & processevent & "'" Rs.Open SQL, Conn, 3, 3
Is giving following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e07' [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. /area51/shimlog.asp, line 53
Read MS webpage and using some :'s in there somewhere could not get it to work
This should be an easy one, but I can't figure it out. I am getting the error: Data type mismatch in criteria expression.
Here is my SQL:
SQL = "UPDATE Revision SET Contact='"&Contact&"', ID='"&ID&"', TR='"&TR&"' WHERE TrackingNum='" &TrackingNum&"'"
TrackingNum is an autoNumber in two of my tables in my database (IME_request) the table names are revision and IME_request. I pull the data from IME_request.IME_request and then I update IME_request.revision with the form values.
I did a response.write to make sure I was getting to form values, and I am.
I am trying to test a sql statement in Access which gives me the error as stated in the heading.
The sql statement is built as a part of asp login verification, where the userid and password are input in login screen. The password in the database is a number field.
I am writing the dynamic sql statement as follows below. I believe I am going wrong in the password section of the code:
I'm using APS VBScript web page on an Access2000 database and I am trying to select from a recodset using a date as the criteria. I keep getting ADODB Data Type Mismatch errors no matter what I do to the database field (which hold a date/time) or the URL. My URL looks something like ... result.asp?id='3/20/2005'... The database field is an Access date/time field formatted to mm/dd/yyyy.
I am currently developing a project for a bus company to book seats. I have started this program but have ran into a problem as need to search a criteria e.g. Name , date, Telephone etc so i can choose to edit or delete the record.
I need to use a txtbox to search for the record as their will soon be thousands of records so i will need to search for a record by a criteria to either delete or edit the record i hv uploaded a copy of my http://www.angelviewinn.co.uk/smithy330/customers.mdb i am using it is very simple.
Basically, I want the user to be able to select criteria on the asp page for their search and then those that match will be shown. I don't know if form is the best way or another method.
Does anyone have any ideas for good resources or know how to do it?
Example:
The database is of stock homes. User can select sq. footage, price range, home style, # of bathrooms, # of rooms, location, etc.
After user submits criteria those homes that match criteria will show.
i'm looking to select records based on date, the database stores the date as mm/dd/yyyy time am/pm ie: 08/11/2004 2:42:28 PM and unfortunately the field is called date
this much I know if i want to select based on date:
select from table where [date]=
it's my understanding that i need to put the name of the date field in [] in order to prevent it from confusing it with functions etc... however my problem is this
how do i get it to select records from the month of december i have tried [date]='12/*/2004' and [date]='::12/*/2004::' and many other variants that i have read about on various web sites, but it never seems to work once again the answer is probably not as complicated as i believe it to be,
I have a combo box in an ASP page, there are 7 lists total in the combo box, there is another text box on the page and a search button. I want the users to select an item from the combo box and type a keyword and click search.
The combo item and keyword will be used as an criteria to query a SQL database. I'm familiar with SQL connection and running queries but how do I take the criteria and pass on further.
I am trying to change an existing function that currently only displays records that fall under a criteria of
NOT(now>cdate(OTDate & ' 2:00 AM')
If I wanted to change this function to display entries that are before 6:00 pm the day before the OTDate, how could I modify this part of my code? should is be something like this...
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects?
For example:
User selects "name" in a select statement which would list the possible names to select from or if the user selects "telephone" in the same select statement then it would list the possible telephone numbers to select from.
Or simpler:
If user selects A then show P to select from or if user selects B then show Z to select from.
I am trying to search for clients contained within a database using multiple search criteria that the user is able to select using a front end form.
The user is able to select there criteria by selecting one or more check boxes and the results are thus retrieved based on what the user has selected. The search works fine until you try and select multiple client types Code:
Can anyone give me a regular expression for finding a URL in a string of text?
Essentially what I want to do is find URLs in a text string and embed them in {a href...} tags. However, I haven't used regular expressions all that much in ASP/VBSCRIPT.
I need to create a regular expression for a date field that works only in the following format MM/DD/YYYY with the / in the format. No other format can be inputted into the field. I need 2 numbers for MM 2 Numbers for DD and 4 numbers for YYYY. If the users enter 1 number for month, 1 for day he should get an alert.
I have this code and thought it was working but it is not.
I am trying to validate an input field that should only accept numeric values no larger than 6 digits to the left of the decimal and up to 2 digits to the right of the decimal. The values to the right of the decimal are optional though.
so the max format should be (xxxxxx.xx)
I tried this format:
"^(d{1,6}.*d{0,2})$"
but this format takes values larger than what i want.
I'm going down the road of learing the pattern matching in regular expressions, and I'm trying to convert the characters into English in my head so I can see whats happening...
For clarity with this one...
[b]([^]]+)[/b]
Ok - the first thing I did was break it up - because it looks a nightmare like that...so now I have..3 parts..
[b]
([^]]+)
[/b]
In part 1 I under stand that the is telling the expression that a special character is coming next, thus escaping the [ and ] respectively, thus , and in part 3 I understand the same and also the escaping of the /, thus - no problems so far...
In part 2 I'm assuming that the brackets are seperating a "pattern" so that I might reference it as $1 later on, I understand that the [^] are saying "not enclosed" so therefore it's going to ignore a ], the + sign however perplexes me - my VBScript book says "Matches the preceeding character one or more times" - so does that mean the ] just before it, or does it mean the character OR characters defined within the [ ] etc?
is it possible to have a replace() function in an SQL query? I need to use something like that to be able to sort my "sequential-numbers", which are actually textfields like this:
98.1 98.10 98.2 98.3 98.4
What I want is to query these numbers, convert them by removing the dot with the replace command and the sort the recordset on it.
I'm trying to find a regular expression function to strip contents out of a string which lie between square brackets [].I've got one for chevrons (to remove HTML - as below), but would prefer not to have to replace the chevrons for square brackets first.Code:
function funRemoveHTML( strText ) Dim RegEx Set RegEx = New RegExp
RegEx.Pattern = "<[^>]*>" RegEx.Global = True
funRemoveHTML = RegEx.Replace(strText, "") end function how I can modify this for square brackets as opposed to chevrons?
A client wants have acess to an online databases records controlled by group strings and evaluation strings e.g., each use would have in his client record a group string like this:
[ROOT][ADMIN][ACCOUNTING][ABC PRODUCTS]
And each record in a database would have an evaluation string like this :
([ROOT] OR [ADMIN] OR [ACCOUNTING] OR [FINANCE]) AND [ABC PRODUCTS] OR [ACME]) etc.
No limit to the number of groups or the complexity of the boolean expression evaluation algorithm. I need an asp function that I will just pass the group string and the evaluation string and it will return True or False as to whether the client can view that particular record. I can't find anything in ASP on the internet though this must be a common database control method for non-browser applications? Has anyone done anything like this in ASP?
I'm making url's out of text starting with "www" etc. but I've got two problems. Firstly, if the string begins with www it doesn't get matched, and secondly, if there's a dot or a comma directly after the url, it becomes part of the url. I hope someone who is better at this than me will be able to help me out. Code:
reg.Pattern = "(s)(www)(S)(S+)" s = reg.Replace(s, "$1<a href=""http://$2$3$4"" target=""_blank"">$2$3$4</a>")
I have a SQL statement here that im trying to troubleshoot, it is coming up with 'join expression not supported'. I have tried the statement in the access database (in msaccess) and it works fine without any errors. The statement is as follows:
Code:
strSQL = "SELECT 'tbl Item.Art_No', 'tbl Item.Description', 'tbl Item.BA', 'tbl Item.Retail Sales Price Incl GST', 'tbl Item Bin SOH.Location', 'tbl Item Bin SOH.Blocked', 'tbl Item Bin SOH.Stock on Hand' FROM 'tbl Item' INNER JOIN 'tbl Item Bin SOH' ON 'tbl Item.Art_No' = 'tbl Item Bin SOH.Art_No'"