Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Urgent ASP Help required for a complete novice


Message #1 by RDingwall@m... on Tue, 18 Dec 2001 18:28:21
I wonder if anyone would be good enough to help me.  I am completely new 

to ASP and have to link two databases by postcode.   One database has all 

my information stored names, addresses and postcodes this is called 

Information.mdb.  The other is being used on the internet where the user 

can view his Trusted Postcodes which are stored in another database called 

UserInfo.mdb.  Both of these databases are Access databases.  I will be 

using UltraDev Dreamweaver 4 but again I am completely new to this as well.



I need to allow the user to view all his Trusted Postcodes so it needs to 

link my database Information.mdb and the UserInfo.mdb database by 

postcode.  I have no idea how to do this.  



I also need the user to be able to delete a Trusted Postcode he no longer 

wants, add one if he wants and view all Trusted postcodes on a new page.  



All these task are probably easy for someone who knows how and I just 

wondered if anyone had any code to help me carry out the above.



Kind regards.



Message #2 by "Ben Clemens" <ben@b...> on Wed, 19 Dec 2001 13:59:47
Hello:



I am also somewhat of a novice and may not be the person to help you, but 

I feel your pain and thought I would tell you what little I know.



In order to construct pages that show or manipulate your data, it's 

easiest to have both tables you mention in a single Access mdb file that 

resides on a server somewhere. Within Ultradev, you will then construct 

recordsets based on a SQL query of your two tables (this query is 

constructed in the 'advanced' part). This query will have to be written 

in SQL, which is not nearly as hard as it seems. What you will need to do 

I believe is an 'Inner Join'. I puzzled my way through it in a day and it 

isn't so hard. I would think that Ultradev would make it easier than I 

had it. The basic SQL syntax is straightforward, try 

http://www.w3schools.com/sql/sql_join.asp



I hope this helps and if you have any more desire for semi-skilled 

advice, please mail me.



good luck



Ben





> I wonder if anyone would be good enough to help me.  I am completely 

new 

> to ASP and have to link two databases by postcode.   One database has 

all 

> my information stored names, addresses and postcodes this is called 

> Information.mdb.  The other is being used on the internet where the 

user 

> can view his Trusted Postcodes which are stored in another database 

called 

> UserInfo.mdb.  Both of these databases are Access databases.  I will be 

> using UltraDev Dreamweaver 4 but again I am completely new to this as 

well.

> 

> I need to allow the user to view all his Trusted Postcodes so it needs 

to 

> link my database Information.mdb and the UserInfo.mdb database by 

> postcode.  I have no idea how to do this.  

> 

> I also need the user to be able to delete a Trusted Postcode he no 

longer 

> wants, add one if he wants and view all Trusted postcodes on a new 

page.  

> 

> All these task are probably easy for someone who knows how and I just 

> wondered if anyone had any code to help me carry out the above.

> 

> Kind regards.

> 

Message #3 by xywu@k... on Thu, 20 Dec 2001 08:32:35 +0800 (CST)
create two connections then search it

set conn1=server.createobject("adodb.connection")

set conn2=server.createobject("adodb.connection")

conn1.open "driver=...;dbq="&server.mappath("information.mdb")

conn2.open "...........;dbq="&server.mappath("userinfo.mdb")

set rs2=conn2.execute("select post from yourtable where username='xxxx'")

while not rs2.eof 

  str2=str2&"," &rs2("postcode") 

  rs2.movenxt

wend

if len(str2)<>0 and left(str2,1)="," then str2=right(str2,len(str2)-1)

set rs1=conn1.execute("select * from yourtable where postcode in("&str2&")"



..........



the recordset rs1 is the result

> I wonder if anyone would be good enough to help me.  I am completely new 

> to ASP and have to link two databases by postcode.   One database has all 

> my information stored names, addresses and postcodes this is called 

> Information.mdb.  The other is being used on the internet where the user 

> can view his Trusted Postcodes which are stored in another database called 

> UserInfo.mdb.  Both of these databases are Access databases.  I will be 

> using UltraDev Dreamweaver 4 but again I am completely new to this as well.

> 

> I need to allow the user to view all his Trusted Postcodes so it needs to 

> link my database Information.mdb and the UserInfo.mdb database by 

> postcode.  I have no idea how to do this.  

> 

> I also need the user to be able to delete a Trusted Postcode he no longer 

> wants, add one if he wants and view all Trusted postcodes on a new page.  

> 

> All these task are probably easy for someone who knows how and I just 

> wondered if anyone had any code to help me carry out the above.

> 

> Kind regards.

> 

> 




----------------------------------------------

»¶Ó­Ê¹Óà km169mail µç×ÓÓʼ
ϵͳ http://email.km169.net

Thank you for useing km169mail Email system




  Return to Index