Access, Not Instr
I dont want those Disp selected from access db...I am getting an error..How will I do that ?
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "49, 50"]'
/drv_sch/Generate_Sch.asp, line 55
----------------------------------------
Driver_id is a number...Disp variable has these data "49, 50, 51"
SELECT * FROM schedule WHERE not instr('Disp',driver_id)
View Replies
ADVERTISEMENT
Why does this code Code:
Dim mytext
mytext = "Tristique, sed tamen typicus amet, bene quia feugait eu. "
Response.Write Instr(mytext, "tamen")
Gives the response "16"? Surely this word only appears once? Is it counting letters? How can I make it identify just words?
View Replies
View Related
How do I use InStr to find the string d="1"
I have tryed:
InStr(text,"d="1"") and it does not work
I have tryed a few other variations and I cant get it to work.
View Replies
View Related
I am searching a string that look like this (21,5,15,25) using Instr().
So, if I am searching for '5', I get everything that contains a five.
If InStr("21,5,15,25", req,QuerStr("id") Then
response.write "yes"
End If
I want only the one value '5' to get found but anything that contains a 5 is found. I have tried using Cint and Int to no avail.
View Replies
View Related
I have a field name "tracks" of string data type that has multiple names in it (for example: calder delaware$ aqueduct ), and I want to check to see if this certain field has "delaware$" in it. InStr or the Mid functions return the numerical order of where that string starts inside the string, but it doesnt tell me if "delaware$" exists in "tracks".
View Replies
View Related
was the instr() in asp means... meaning - why it is used.
View Replies
View Related
Using MySQL as a DB, I'm generating an OTF SQL statement that looks for matches in a comma delimited string. The code ends up looking something like this: Code:
View Replies
View Related
I am having a problem with the following code:
<%
If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then
Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>")
Else
Response.Write(TestRS.Fields.Item("Testimonial").Value)
End If
%>
I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.
I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.
View Replies
View Related
Which is better practice?
Code:
Select * From groups Where groupName LIKE '%bli%' AND cusType LIKE 'CUST%'
or
Code:
Select * From groups Where InStr(groupName,'li')>0 AND InStr(cusType,'CUST')=1
Right now I'm using and Access database but plan to upsize to a MSSQL if that makes any difference. Are there any advantages or disadvantages to either technique?
View Replies
View Related
Just used this code and noticed it doesn't always work, turns out InStr is case sensitive.What's thet best way to do a non-case sensitive search?pHP Code:
IF INSTR(VideoName,"HiRes") THEN
View Replies
View Related
I've been given a large database of "model numbers". based on these model number I have to do something different. example model numbers:
B2020-SG1
B2020-SG4440
B2020-LG3
B2020-LG33E
B2020-SG1-SG1
B2020-SG1TD9-SG1
B2020-SG1TD15-SG4440
Basically, the first number (B2020, which could be a number of different numbers) is the model. the second and/or third number is what I have to act on. The problem is, how do I pull that third number? Especially if its the same as the first number. right now I'm using Instr(variable1, "SG1") to pull each different set of numebrs. but that only finds the first occurence. what about the 2nd? how can I find that?
View Replies
View Related
My question is
I use:
-----------------------------
dim strText,pos
strText = "This is a test!!"
pos = Instr(strText,"a",1)
response.write pos
-----------------------------
and i get:
Type mismatch: '[string: "This is a test!!"]'
What's going on?
View Replies
View Related
I'm having some trouble with an error that is thrown when I use InStr() and Mid() with a database search query. In point form:
I am retrieving an array strings from my database where the query is case insensitive. This is good.
Then I locate the keyword in the string using InStr() which is case sensitive. This is not desireable as it doesn't recognize all instances of the keyword.
I use the Mid() function to give me a portion of the string starting at the location provided by InStr() which is sometimes the number zero which in turn throws the error.
View Replies
View Related
I have a string --> 7,8,9,10. This string may contain more or less than 4 numbers.
I want to separate each number and run an sql query for each number.
for example:
select * from table1 where code = '7'
select * from table1 where code ='8'
and etc....
Can I do this in a loop?
View Replies
View Related
I get this error melding >>>Invalid procedure call or argument: 'InStr' and this is the code where this error refers to:
If (InStr(r, UCase(strRetVal), "<TABLE>") > 0) AND _(InStr(r, UCase(strRetVal), "<TABLE>") < _
InStr(r, UCase(strRetVal), "</TD>")) then ThisCellText = mid(strRetVal, StartCellText, _
InStr(r, UCase(strRetVal),"<TABLE>")- StartCellText )
Else
ThisCellText = mid(strRetVal, StartCellText, _
InStr(r, UCase(strRetVal), "</TD>")- StartCellText )
End If
in this area i am doing something, can anyone plz direct me and tell whats wrong?
View Replies
View Related
I have a variable - a large string of text - called row1. Im using VBscript to parse this row for useful information that I need. The row1 starts off as follows:
bSlip('SO','3664746','','abc','',0)>abc</a></td><td class=o>;</
Im using the position of the bSlip ---- Instr(row1, "bSlip(") to find out where the bSlip text starts and this works fine. The next few lines of text are supposed to use the position of the ">" character and the "<" character to extract the text in between. Code:
View Replies
View Related
I want to use the instr function, but return results from it depending on surtain functions, I can't realy explain so I'll show my example:
I have a string in wich some word I want to find might be in diffrent Capital Letters order, I want the Instr function to return all the values of the place of that word (avcourse I'll run a for and increase the starting point of the Instr func until it returns 0). The instinct thought is to use the Lcase or the Ucase functions, but in this case I don't know how to use them. In the same Idea I wanted to use the Instr Func with the trim Func, But Its realy the same principle if I just understood how to do so.
View Replies
View Related
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?
View Replies
View Related
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....
View Replies
View Related
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.
<code>Dim MM_connPang_STRING
'MM_connPang_STRING = "dsn=pangDSN"
MM_connPang_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:clientdatabasepangDB.mdb"</code>
View Replies
View Related
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.
View Replies
View Related
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.
View Replies
View Related
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?
View Replies
View Related
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?
View Replies
View Related
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?
View Replies
View Related
I generate my codes using a generator. My problem is that I can not write into my Access database. I had gone to tools to allow access permission . still nothing.
View Replies
View Related
I have a MS Access file that consits of 500 movie titles, I already upload this file onto Brinkster.com, but I don't know to code this into ASP or PHP so I can have an on-line database. Please help me code this Access file into an ASP or PHP file.
View Replies
View Related
I have a field in my Access db which is used to put a category against a company, rather like Yellow Pages. The categories are held in another table in the same db. The Category field in my companies table is a look up field using this syntax
SELECT [categories].[ID], [categories].[Category] FROM categories;
My problem is when I want to list a company and do a response.write rs("Category") I get the ID relating to that category rather the description. How can I get the description instead?
View Replies
View Related
I am using Access and ASP.I am just trying stuff out.I created an access database and put some validation in access on some fields.
I created an ASP program to insert into my database.
When I try to insert a record that validates OK with access rules all is fine.
Then I type input that violates the access rules; I hoped to get a helpful message back.
All I got was my message saying an error had occured and it was Error number 0 and native error 2097228.
As I was testing I know it is due to failing a validation in access.
I am learning I wanted to look up this native error, I cannot find it in access help or internet searches where would I look for native errors please?
I know I need to validate client side that is not the issue it is understanding native errors!
View Replies
View Related
I'm trying to search the Access database using 3 fields and I think there's a problem in my If statement...pls check it out for me.....I'm using ASP...this is what I'm trying to do:
If Request.Form("txtUser_Id") = "User_Id" and Request.Form("txtWeekNo") = "WeekNo" Then
strSQL = "SELECT (MSD + Methods + Analysis + Architectures + Models + Studio + Elective1 + Elective2 + Elective3) AS PersonTotals, FirstName, LastName, WeekNo, Semester, StudioTeamName FROM tblpersons"
strSQL = strSQL & " WHERE Semester=" & Request.Form("DaInBox")
'strSQL = strSQL & "WHERE Semester ='" & strSemester & "'"
End If
View Replies
View Related
I'm planning to change my database from MS Access to an SQL database. So, what do i have to change in my code for that?Is it possible to have multiple tables in SQL which are linked to each other?Are there pro's and contra's ?
View Replies
View Related
I made a little app that selects data from a database depending whether there is a NO, in the YES/NO column. The data is exported to a txt file with aso. What i'm wondering is, is after the data has been downloaded to that txt file, how to write to the database saying all they were marked NO, go to YES.
View Replies
View Related
I have never dealt with XML before, So this is way out of my realms...
I am trying to get a XML feed into an Access Database..
The XML source can be found here:-
but as you can see.. there is another problem.. the file is in a .GZ format.. so i need some way of Un-Zipping it onto my web host, and then importing the XML data into the database..
Ive looked around, and the only information i can find is un-zipping it onto a local machine, and then uploading the XML file.. but that's not practical.. i don't want my web page to be dependant on my PC at home being logged on...
As for the import of the XML to Access... that's another black hole there.. ive never done anything like this before..
View Replies
View Related