i'm trying to make a form that will pull details from a record that is found with (asset Number) but comes up with this error: 2342 "A RunSQL action requires an argument consisting of an SQL Statement"
Dim SQL As String
SQL = "SELECT *"
SQL = SQL + " FROM Computer"
SQL = SQL + " WHERE (((Computer.Asset)=" & TxtAsset.Value & "));"
DoCmd.RunSQL SQL
I am recieving a weird error when I try to run asp scripts on my local machine, I can use pages that access a database, but when I try to write to the file system ie upload a file I get the error message below.
I have a page that creates a .CSV file that has been migrated over to Windows Server 2003 from Windows 2000 Server. It worked fine before I moved it, but now when it creates the .CSV file, and you open it, the first row opens in cell A1 and the second row opens in cell A2. Code:
I made a little search query asp page connected to a database everything works. Just I added a if then statement but...I don't think I am doing it correctly... This is my code:
<% If strSearch = "true" then %> <% Response.Write "Search Result" %> <% Else %> <% Response.Write "We are sorry your search could not be found" %> <% End If %>
I have been working through a search distance by postcode tutorial. the script works fine when used with an access database however i need to use it with mySql but its throwing up this error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.11-standard]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND Selectmake = 'Audi'' at line 1
the code its refering to is this:
Dim rsResults Dim rsResults_numRows
Set rsResults = Server.CreateObject("ADODB.Recordset") rsResults.ActiveConnection = MM_conNatCarSearch_STRING rsResults.Source = "SELECT * FROM Adverts WHERE Trim(Left(yrPostcode, 4)) IN (" & yrpostcode & ") AND Selectmake = '"& _ Replace(rsResults__MMColParam, "'", "''") & "'"
have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what I need is to type in just a few characters e.g. at the moment to search for all pickups at Heathrow Terminal 1 the user has to type in
Heathrow Terminal 1
When really I just want them to type in
Heathrow or even Heath etc.
Query below
SELECT * FROM booking_form WHERE AirportStation LIKE '" + Replace(BookingForm__varAirportStation, "'", "''") + "'
I have an Access db with a table which contains some fields. I have also created a page in which I have created a form with textfields, listmenus, radio buttons and checkboxes. I would like to pass the values from the form in another asp page in which I will retrieve the records according to the selections made in the form.
If I select all the form fields it works great but if I want to select only two or one field I get nothing. That is because in the SELECT code I have used AND...AND.... Is it possible with if statements to avoid this problem?
I'm creating a database search page and the table I want to search has fields linked to other tables in the database. For example, the job table has a number of fields, 2 of which are area and job type which are tables in the database. My search page has option for searching by job title, job type and job area (via dynamic drop-down).
Do I need to create a recordset for each referenced for the dynamic drop-downs to work?
I have an Access database that I created a query in. The query brings fields from related tables and prompts users to perform a search based on 3 criterias.
NOTE: the prompts can be bypassed by just leaving it blank and selecting OK. So in other words, the user does not need to fill in each prompt for the search to work, it just give them a more narrowed down search if they fill more in...
Now for the ASP part... I want to create an ASP page where the use selects from 3 drop downs. These drop downs are named the same as the field names in my query. How do I get this to work??
I have a field storing Multiple information in a string (ex: <Select name="MUnionCode" Multiple>
This allows the user to select multiple options. These options are stored in an spl database as: option1, option2, option3 etc..
Now, if I want to search that field how can I have it check to see if any of those options are within that string..? Instead of just checking the first option...?
here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i have success in running any query (basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for some reason, when i execute the query below from the asp page, i get no results.
the search.asp page just has a text box in a form that submits the srchBOX field to the results.asp page.
here's the asp code from the results.asp page: Code:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. /changeprofile.asp, line 44
I am working on a project using an access db. Here is the problem.
Error Code: Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'unit=6400s' Unit is what it is suppose to be, I don't understand why I am getting this error? Here's the code for this part.
Code: sql="SELECT * FROM " & tableStr & " WHERE Model=" & unitStr
tableStr and unitStr are variables. Table and unit are passed into the page and are assigned to the two variables through a request.querystring().
I'm trying to get a .txt file from another domain using xml object; this file includes special characters like ñ, á, é, í, ó, ú and so on. The code I'm using is:
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP") xml.Open "GET", "http://domain/file.txt", False xml.Send If err.number = 0 then filebody = xml.responseText set xml = nothing
The problem is that all those chars are converted to "?" symbols. How can I get rid of this thing and get the original characters back?
query="select * from mytable where id="&xx id is a numerical field..
if a user choose xx char or a string my query gives an error in asp... i tried if err.number <>0 then response.redirect "xx.asp" but problem is still continueing
I am trying to run an SQL SELECT query, however, I am experiencing some problems with it.
It is coming up with the error; " Microsoft VBScript compilation error '800a0401'
Expected end of statement "
It is pointing to line 46 which is highlight in bold within my code below; is the error coming up because of the way I have formatted the query?
strSQL = "SELECT * FROM tbl_lunch WHERE (((tbl_lunch.Type)="general")) ORDER BY tbl_lunch.Type;" Thanks for any help you may be able to give me on this
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. /SHOP/add_emp_result.asp, line 41
I need help on this error that occured on one of the pages. fuunny thing that its happen in localhost and not in the web server. below is the code and the highlight of where error occured.The error mentioned in the page is :
Microsoft JET Database Engine (0x80004005) Operation must use an updateable query.
/shop/confirmation21.asp, line 245 . can anyone kind enuff to let me know whats it about?
my page works fine if the db search finds at least one record that satifies the query. but if it does not find a match I get the following error message.
Error Type: ADODB.Field (0x80020009) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
What do I need to change here to make this just display the page with no data? Code:
I have 3 drop down boxes that links to a result.asp page that i want to show the results of the criteria. whenever i hit the submit button, i get this error:
Microsoft OLE DB Provider for ODBC Driverserror '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.20a-nt]Unknown column 'Apartment' in 'where clause' /result.asp, line 34
The line its referring to is like so: rsResults.Open()
I am trying to use a query to filter SQL Server 2000 records by a date value.
Here is relevant columns in my database table (tblContent):
title [nvarchar] starting [smalldatetime]
.... and here is my query:
Query = "SELECT title FROM tblContent WHERE starting = '" & date & "'"
I've done exactly this query on numberous occassions in the past with no problems at all but this time I get the following error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07) [Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
What on earth is going on? I'm not using a char data type anywhere! I am doing all the initial development locally and I have just installed XP Service Pack 2. I realise it's unlikely, but that's the only thing I can possibly attribute it to. Or am I just missing something obvious?
This has been puzzling me for very long time and no where has talked about the scope of a 'On Error Resume Next' statement.
When we program ASP(.NET) pages then we usually like to let ASP(.NET) stop at errors and report back to us. However there are parts of our scripts that we know an error will be thrown and we encapsulate that area inbetween:
On Error Resume Next Err.Clear 'Try block If Err.Number Then 'Catch block End If On Error GoTo 0
This is similar to the infamous try {} catch(e) {} blocks in Java/C++, etc.
If we forget the last line 'On Error GoTo 0' then our ASP(.NET) scripts runs over all errors thrown and we find it hard to find bugs. So the big question is, does 'On Error Resume Next' go out of scope when it's written inside a block (eg. Function)?
Function Function1() On Error Resume Next 'Our code End Function
When the Function1 call returns, does the outside calling scope automatically stays as it was (On Error GoTo 0)?
I m getting the following error when executing the below given code:
==== Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. =====