I currently have to make a change to a file where 123405678 has to be changed to 1234X5678. I am changing numeric to alpha for multiple records...the values are 1=A, 2=B, 3=C, 4=D, and so on. i am only making the change in the 5 position. Would this be an iif statement? If so, how would I begin the statement.
I'm trying to generate this basic recordset within Dreamweaver and I'm having trouble figuring out the correct way to write out this SQL statement. I would like to pull out everything from my products table that has the word Ash in the description. I'm using the following:
SELECT * FROM products WHERE productDescription LIKE 'Ash'
From a search form I perform a query on an access table that uses the like statement on many columns. e.g.
select ____ from people where specialty LIKE '%%' and firstname like '%%' etc etc
The problem is that the statement does not pick up null values, so it omits certain records. This table is constantly updated and when I import the updates null values go into the columns where there is no value.
My question is this: is there a way I can include records with null values for my query WITHOUT having to change the query? I realize I might be able to use where specialty LIKE '%%' or specialty IS NULL, but I would really prefer not to change the SQL.
I am used to SQL Server, no Access, but this one thing has to be done in Access. Can you tell me if this query will work, based on the syntax?
I am trying create a new row on the database, in one table, and the primary key is an Autonumber called PersonalID. This is on the second page, which shows after the personal has filled out some info on the first page, then submitted the form using POST. Database name is Shape, and table is named Personal. Code:
I have this insert statement where instruction field in the DB is a memo field.
SQL="INSERT INTO int ([instruction]) VALUES " & _ "('"&Request.Form("myTextarea")&"')"
objConn.Execute(SQL)
Its giving me error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
I have a Development server that is running Win2k, IIS 5.0, and ASP enabled. I am trying to gain access to an Access 2000 DB located on a file server within my domain. I'm pretty sure I have all the correct permissions set, but I am having problems when trying to access the DB.
The error is similar to:
The Microsoft Jet Database engine cannot open the file '******'. It is already opened exclusively by another user, or you need permission to view its data.
I'm looking for ways to fix this... Microsoft suggests turning off the ability for IIS to sync passwords. Unfortunately, this is not a viable solution for me.
Is it possible to create a new virtual server that is a share to my file server? Put my ASP and MDB file in there and have it work? Anyone have any other ideas?
I'm working on a site that inserts records into an Access database and Access assigns an auto-incrementing id for the record. How can I quickly figure out what id that was just created? I seem to remember there being a function for this....
I want to move my only window shosted client to linux. The site they have access a Microsoft Access database with the below code but i can't get it to work under Linux.
I'm trying to access a table in a MS Access database using ASP but the name of the table is causing me some trouble. The problem is the table name has a space in it eg, "My Table".
If i try and access it using a query "SELECT * FROM My News", it says i cant find table "My". If i remove the space from the name (to MyTable) it works fine. But the trouble is its a customers database and i cant easily rename it because its linked to other tables and db's.
How can i access a table with a space in its name? I've tried "SELECT * FROM My_News" but that doesnt work either.
I have an ASP page needs to access a remote MS Access2000 database, I got error "The Microsoft Jet database engine cannot open the file 'F:Collect.mdb'. It is already opened exclusively by another user, or you need permission to view its data. ".
The 'F:' is a mapped drive from remote machine where the access database loactes. If I copy the database back to local box, no problem.
I'm looking to make an online multiplayer game which will utilize Access Database... basically I require thousands of people writing and reading from the same database... I was wondering if this is possible for that... or is mdb file restricted to 1 person at a time...
If it is limited what would you suggest as the best way to control an interactive online environment? .txt files possibly?
What is this all about? Generally I run against SQL Server but now I have to use access. The query I want to run is a simple double join
SELECT tblArtists.*,tblGenres.name AS genreName,tblPages.pageId FROM (tblArtists INNER JOIN tblGenres ON tblArtists.genreId = tblGenres.genreId) LEFT JOIN tblPages ON tblArtists.artistId = tblPages.artistId ORDER BY surName ASC, firstName ASC
Now If I run this question in access against the database it accurateley returns two posts. BUT When I paste the same query into an asp document and runs it with a fileDSN against the same database it returns nothing!? Is this some kind of joke from Microsoft?
I have an Access DB which contains couple of link tables. All these tables are from different databases. So each one has it's own database password. Since there is no way to save the password during the DSN creation. Then you need to manually type in the password each first time when open the table.
This causes the problem in ASP code during run a query. Since the table cannot be accessed due to the password protection. Is there any statement than can open a table and meanwhile pass the password in? Does anyone experienced with the similar situation?
return all of the exact matches Jon Doe (user uses quotes to clarify an exact search) along with that: return all of the James and all of the Doh as well qry to look like this as soon as I am able to divide up the string entered in by the user select * from table where (NAME LIKE '%Jon Doe%') or (NAME LIKE '%James%') or (NAME LIKE '%Doh%')
Thinking of using the instr to find the " but then what do I do to find the string inside of the two quotes, One quote would be easy. there is a couple of checks to preform:anyone run into this before or have any ideas/samples, etc
I have created a query wizard page with ddl as your choice to find info. now each ddl has a default of a dash.
The thing is I want to do is have the sql statement to look through the database even when some of the ddl have a dash on them. or just ignore the ones with a dash and look for the ones that are selected. Is there any suggestions for this.
Below is my code for a question system i have created. However, i need to insert an if statement that redirects the user to test.asp if the value of q_id is not in my database, but i dont know how to do it?
<% q_id = request("q_id")
sql = "SELECT * FROM questions WHERE PARENT_ID = 1" Set objRS2 = Server.CreateObject("ADODB.Recordset") objRS2.Open sql, objConn
sql_sql = "SELECT * FROM questions WHERE PARENT_ID = " & q_id Set objRS3 = Server.CreateObject("ADODB.Recordset") objRS3.Open sql_sql, objConn
i make a form with an AccountId box on it , when u enter the accountid in the box , and submit it will send u to a page that show u all the data for this accountid(retreive data)
until here everything is ok , and when i enter for ex. accountid : 5 , all the aacountid fiel data will be show to me , but the problem when i enter am unvalid accountid , it will give the error page that
what iwant to do that i want when i enter an unvaildaccountid an error text show to me like
response.write("The Id that u entered is unvaild , Try Again")
and this is the code , if u can change on it Code:
I am trying to use the following IF statement, and whenever I use a single or double quote, I receive a syntax error. When using no quotes, the syntax is accepted, but the statement does not perform properly.
***The problem line*** <% if violation_type=''Tardy'' THEN %> ***rest of the statement*** TARDY VIOLATIONS <% if rs2.Fields(0) = 0 THEN %> This is the first unexcused Tardy violation for this employee. A coaching is required. Click <A HREF=blah>HERE</Ato issue the coaching. <% ELSE %> This employee has <%response.write(rs2.Fields(0))%previous violations. <% END IF %> <% ELSE %> The <%response.write(violation_type)%violation has been recorded. <% END IF %>
On a page with a form (post method) and a hidden field "Process value = true", why would this statement not work:
<% if request.Form("Process") = "true" THEN The code in here sends an email to the user via CDOSYS End IF %>
This is what I have going on and it does not send the emal when the form is posted. Removing the If statement obviously sends the email the moment the form page is accessed, but thats not right.
i have a couple of if statements and it goes something like this, the user will try entering their username and password in the login page then they will be taken to a verify page, then it will decided if the user can be send to the login page again or to the invalid page. The problem is that after 3 times the user is still send to the login page and not the invalid page My verify page code is :- <% session("try") = try if try = "" then try = 0 else try = try + 1 end if if try <> 3 then response.redirect("login.asp") else response.redirect("invalid.asp") end if
Recordset1.Source = "SELECT `bestsellerslists`.`itemnumber`, `bestsellerslists`.`list`, `products`.`Product_ID`, `products`.`Product_Name`, `products`.`Price`, `products`.`Sale_Price`, `products`.`Smallpic` FROM `bestsellerslists` INNER JOIN `products` ON (`bestsellerslists`.`itemnumber` = `products`.`Product_ID`) WHERE (`bestsellerslists`.`list` = "girlinfant")"
In Macromedia, the recordset tests fine. When I start the page, I get an error. Do you see anything wrong with this? If I delete the WHERE clause it works.
I'm having a problem with my variables. They print to screen fine, but when I try comparing them, they don't work. Can anyone tell me what I'm doing wrong?
If Category <> CurrentCategory then response.write "<tr><td>Category:" & Category & "</td></tr>" response.write "<tr><td>CurCategory:" & CurrentCategory & "</td></tr>" else response.write "<tr><td>hello</td></tr>" End If
I am passing in values either customer id (key) or their names (name) from a form . You don't have to use both the id and the name to search for the customer however I don't know how to do this! If the keyform = "" then , use the name to find the customer else can't find it! this is what I have at the moment :
keyForm = Trim(request("key")) name Form = Trim(request("name ")) Dim name , cyfeiriad, tref, sir, codpost, ebost, ffon, cyfrif, dyddiad Set dnsSQL = g_con.Execute("SELECT key_user_accounts,name ,cyfeiriad,tref,sir,codpost,ebost,ffon,cyfrif,dydd iadcreucyfrif from cwsmeriaid Where key_user_accounts = " & keyForm & " if not name = "" then and name = '" & nameForm & "'") else ") end if
ii am using a statement to send a query to the SQL server and i am getting errors like expected end of statement. what might be the problem and do i use a statement like this for dynamically assign values or it's better to use stored procedures.
dim mySQL="Select * from logindetails where loginname='" & logname & "'"