Query Database, Column 'ID'
The following code works fine doing a query in the db and return the data with the link ...mes.asp?month=X (where X is a month and mes.asp is the name of the file that this code is in...)
I have a ID column in the database and would like to know how to catch data from ID.. i have tried without success, dunno why but the code comes with a error in the line "rs.Open sqlStr, data_source"... Code:
View Replies
ADVERTISEMENT
I am looking for a asp script, that will do an OR search on keywords in two differant columns in an MySQL database. for example if someone searches for joe bloggs I want to bring back all records that have either of the words joe or bloggs in column one or column two.
I have found a script that does exactly what I want but it will only search one column of a database whereas i would want it to search two columns. http://www.4guysfromrolla.com/webtech/052799-1.shtml
how to modify this code or point me in the direction of some other code that will do the same job.
View Replies
View Related
I know how to write a script that will show all the tables fieldnames and then all the tables fields, but how can I do it so that it shows the database table one column at a time? for instance:
fieldname 1
<br>
1st fieldvalue for this column
2nd fieldvalue for this column
3rd fieldvalue for this column
<P>
fieldname 2
1st fieldvalue for this column
2nd fieldvalue for this column
3rd fieldvalue for this column
etc..
View Replies
View Related
I have about 26 checkboxes that place all of my contacts into categories so in my database for contacts i have a field called categories that contains all of the categeories that each contact belongs to seperated by a ",". 1,5,17 etc.
I need help getting these values out of the database so that when I user select category 17 they get all of the contacts that containg the 17 in their respective categories field.
View Replies
View Related
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
View Replies
View Related
I have this code that retrieves the logged in users info. What I also need it to do is to display other records in the database that match the logged in users custnumber. Code:
View Replies
View Related
i'm confused about perfoming insert, update and delete operations in a database. I know that to only use SELECT statement you would create a recordset and use it but for all other you need to use Command or Connection Object.
I'm confused because in some books/articles they create and open a connection and perform insert/update using that. in others they say to use Command object instead. which one do u use when?, why?.
View Replies
View Related
I wish draw data from a MySQL Database using ASP.
The Code I have so far:
<%
dim adoConn, adoRS
set adoConn = Server.CreateObject("ADODB.Connection")
set adoRS = Server.CreateObject("ADODB.Recordset")
adoConn.Open "driver={SQL Server};server=SERVER-WEB;database=testing;uid=products;pwd=starmart"
adoRS.ActiveConnection = adoConn
%>
and in the asp page code:
116. <%=rsDaySummary.fields("PageViews")%>
This is obviously wrong as it returns this error:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/stats.asp, line 116
Any pointers would be appreciated.
View Replies
View Related
i have this shopping cart i'm working on and it keeps giving me this error and the original code is on the bottom. Code:
View Replies
View Related
I am using MS Sql server and asp pages together.The problem I am getting is not knowing what data type to best set my data to.There is a part # set to nvarchar which seems to work great.
THen an Inductance, currently set as float. My inductance values show as 1.5 and 5, 3, 3.2, etc etc, however I need it to show 5.00 and 3.00, 3.20 etc.the inductance is measured in mH and another column called DCR is measured in Ù. Is there anyway to get this symbol to show in my table on my asp page? or do I need to enter the symbol into the database table?
View Replies
View Related
im using ajax to load different pages of code into containers on one page.. i have checked my code.. and things SEEM to be named correctly.. and i know the db is workin because it populates the drop downs properly.
so if you could do this form me.. choose the first radio.. 'london postcode' and proceed from there.. when you click the get quote that error comes up.
View Replies
View Related
I am trying to create a xml tree using sql server 2000 and asp 3.0 i am looking for a code for it .
View Replies
View Related
I need to know the syntax to achieve the following.
<%
Dim Year_Value_Num = 1999
Year_Value_Num = 1999
rsUsage.Open "Select AuthorLastName,ReceptorName,Year from TblAuthorInfo where Year > Year_Value_Num ", strConn
%>
The database access works fine otherwise But if i attempt the above code i get the error.
View Replies
View Related
I don't excactly know whether this is an ASP, webserver or SQL-Server problem:
I have an ASP with a search form. By clicking the submit button it redirects to my result.asp page which initiates a database query that takes pretty long (up to 4 minutes).
Now if I push the cancel button in my browser because it takes too long and want to open another ASP page in that browser window I just get the "page loading" bar until, it seems, the query I initiated before has finished, and then shows up the wished page.
What I think is, that the webserver is waiting for the the command:
set rs = db.Execute(sql_search_string)
to be finished by the SQL-server and does'nt respond to other page requests (but only in the same browser window) until the recordset is filled with the information from the SQL-server. Code:
View Replies
View Related
I am trying to query an Access database using the like operation; however, when I test the query in the browser all records from the database are displayed. Here is my code:
View Replies
View Related
I am using ASP with VBScript. I want to query an access database username
field, and display the output as a hyperlink on an a webpage.The webpage
will display all records. I then need to be able to select a given
record(hyperlink), and display all of the fields for that record on another
webpage so I can execute some code against it.
Can anyone point me to some sample code so I can get an idea of how to
accomplis this?
View Replies
View Related
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?
View Replies
View Related
it possible to pull the information from a query located inside the .mdb database already, instead of pulling the information from the tables ?
View Replies
View Related
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??
View Replies
View Related
I have created a query and everytime I try to run it I get this error:
Microsoft JET Database Engine error '80004005'
Record is deleted.
/vsadmin/inc/incsearch.asp, line 162
This is the query: Code:
View Replies
View Related
I want to retrieve a large number of rows from my database (Select SomeColumns from myDatabase)and then to fill a table with the retrieved data. What can i do?
View Replies
View Related
I would like to know how to go about sending a query to a database when a certain image/link is clicked by the user.
By this I mean e.g. table in a database called cd, primary key in table id. Each image/link has its own id number which refers to its record in the table.
So when the user clicks an image or link i would like it to preform a SELECT query using the id number.
How would i go about giving a link/image its own id number? I guess this is simple as i have seen it on many sites and have seen the query string at the bottom of the browser in status bar when you hover over image/link.
View Replies
View Related
Currently, I do the following in my ASP pages when making use of an MS
Access database:
Dim adoCon, rsSet, strSQL
Set AdoCon = server.CreateObject("ADODB.Connection")
Set RsSet = Server.CreateObject("ADODB.RecordSet")
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("MyDB.mdb")
strSQL="SELECT * FROM MyTable;"
rsSet.Open strSQL, adoCon
...do some stuff...
rsSet.Close
adoCon.Close
Set rsSet=Nothing
Set adoCon=Nothing
I have a couple queries stored in the database that I use when in MS Access.
Can I call these queries instead of using a string to specify the SQL
command?
The above seems kind of verbose for making use of a database. Can it be
simplified at all?
View Replies
View Related
I have a form and when you click submit it is supposed to open up the database add the stuff from the form to the database and close the database. The problem is i am getting an error that says this:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/getInfo.asp, line 35
this is line 35:
objRS.Update
View Replies
View Related
I have this page with photo thumbnails that are clickable. Each photo has corresponding info saved on a database. When the thumbnail is click, im trying to show the data in an asp page called info.asp.
sample:
Photo #1 when clicked goes to: info.asp?no=1
Photo #2 when clicked goes to: info.asp?no=2
so on so forth..
the database fields are:
no
picname
date
details
I only know how to display ALL info from a database.
But i cant figure out how to display SPECIFIC info triggered by a query string. Example. Photo #1 is clicked. I only want the data that corresponds to Photo 1 to be displayed. How can i do this?
View Replies
View Related
I have the following code that pulls a record based on a form submittal then populates a form with the fields so the record can be updated. My problem is in my query line more than likely in my keyset types and what not. Code:
View Replies
View Related
I want MS Access 2000 database column of table 1 = column of table 2. This is what I was doing: Code:
View Replies
View Related
My code retrieves a username and a password from a form. Then this information is compared to some usernames and passwords that are stored in a database. The important thing here is that the comparison must be case sensitive meaning that "passWord" is not the same thing as "password"
I have this code, working fine in access 2003
SQL = "SELECT * FROM users WHERE StrComp(username_column,'" & entered_username_in_form & "',0) = 0 AND StrComp(password_column,'" & entered_password_in_form & "',0) = 0"
but get the following error when I run it against my sql 2005 database.
[Microsoft][SQL Native Client][SQL Server]'StrComp' is not a recognized built-in function name.
I don't know the corresponding t-sql for the query.
View Replies
View Related
I have a csv file that I'd like to be able to add a column to. Specifically, I want to take the first 6 chars of the filename and add it to each row as a new column. e.g.
Code:
whatever.csv 'before
1,2,3,4
whatever.csv 'after
1,2,3,4,whatev
View Replies
View Related
Ok let me explain what I am trying to do as easily as I can. I have a table in my access database that I am connecting to. I select a specific id number using my SQL statement. Now what I am trying to do is scroll through that records row and get the column name of that column along with the value of that cell. I hope that isn't to confusing. Now I'm not sure whether this would be done using ASP or done in my SQL statement. Code:
View Replies
View Related
How do you get the description of fields in an Access database? I really need this and can't find it anywhere....
It would also help if someone showed me how to get the datatype and other info (like if it's a Yes/no or True/False field).
What is the resource/doc for this so I know where to look before asking from now on?
View Replies
View Related
Ok i'm self taught with regards to ASP so not great etc, so sorry if this is a really basic question..
On the last line here i'm trying to some how get it to call the last ID entry...
ImageID = Request("ID")
If (Len(ImageID) = 0) then ImageID = "1"
If Not IsNumeric(ImageID) Then ImageID = "1"
If ImageID = "0" then ImageID = "1"
If ImageID>3 then ImageID = max(Len(ImageID))
This is basically for some max min links for a online comic here's what it links to
<a href="default.asp?id=<%=ImageID-1%>">< Backwards</a> -
<a href="default.asp?id=<%=ImageID+1%>">Forward ></a> -
Code:
View Replies
View Related
Can someone please explain to me why the hyperlinked column headings will sort in Firefox and IE 7 but not in IE6. Code:
View Replies
View Related