473,480 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Access Database Query to run in a webpage using ASP

20 New Member
Hi,
I am looking for help with a project. I am looking for a database to show me who has not payed thier bill after 30 days and if this could be a pop message. I need it to be on a webpage then i need it to send an email to the client who has not paid asking to settle the bill

Thanks Claire
Apr 25 '07 #1
5 2582
jhardman
3,406 Recognized Expert Specialist
Hi,
I am looking for help with a project. I am looking for a database to show me who has not payed thier bill after 30 days and if this could be a pop message. I need it to be on a webpage then i need it to send an email to the client who has not paid asking to settle the bill

Thanks Claire
So, what have you done so far? This is all doable.

Jared
Apr 26 '07 #2
harky
20 New Member
So, what have you done so far? This is all doable.

Jared
thats the thing i dont know where to start. I have made the website and have a database made. from here i dont know.
It is awful i really have no knowledge of this at all.
I would be very grateful if u could help

Thanks
Apr 26 '07 #3
jhardman
3,406 Recognized Expert Specialist
thats the thing i dont know where to start. I have made the website and have a database made. from here i dont know.
It is awful i really have no knowledge of this at all.
I would be very grateful if u could help

Thanks
A good place to start would be with a brief tutorial. ASP likes to use "ADO" to connect to databases. This tutorial is good if a bit basic.

here is an example of an asp script that opens a db table and writes a webpage:
Expand|Select|Wrap|Line Numbers
  1.  <%
  2. dim conn, rs
  3. set conn=Server.CreateObject("ADODB.Connection")
  4. conn.Provider="Microsoft.Jet.OLEDB.4.0"
  5. conn.Open "c:/inetpub/myDataBase.mdb"
  6. set rs=Server.CreateObject("ADODB.recordset")
  7. rs.Open "SELECT * FROM myTable", conn
  8. response.write "<table border=1><tr>" & vbNewLine
  9. do until rs.eof
  10.    for each x in rs.fields
  11.       response.write "<td>" & rs(x) & "</td>" & vbNewLine
  12.  
  13.    next
  14.  
  15.    rs.movenext
  16.    response.write "</tr><tr>"
  17. loop
  18. response.write "</table>"
  19. %>
Jared
Apr 26 '07 #4
harky
20 New Member
Thankyou i know how to do that bit, that is they only part i know. when i have a query done on my database will i use this code to bring up the clients who have not paid after30 days.
I
This is code below was another exercise i had to do.

<%Response.Buffer=True%>
<html>
<head>
<title>Claire Harkin's ASP Exercises</title>
</head>
<body>
<b>Claire Harkin's Phone Book</b><p>
<%
Dim rs, conn
set conn=Server.CreateObject("ADODB.connection")
set rs=Server.CreateObject("ADODB.recordset")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("phonebook.mdb"))
fln=request("find_Last_Name")
sqlstr="select *from entries where Last_Name='"& fln &"'"
rs.Open sqlstr,conn


Response.Write"<table border><tr>"

while not rs.EOF
Response.Write"<td>"& rs("ID")&"</td>"
Response.Write"<td>"& rs("Last_Name")&"</td>"
Response.Write"<td>"& rs("First_Name")& "</td>"
Response.Write"<td>"& rs("Tel_Number")&"</td>"
Response.Write"</tr>"
rs.MoveNext
wend

Response.Write"</table>"

rs.Close
set rs=Nothing
%>

i am going to use code like that to bring up my table on the webpage. would that be right.
Just not sure how i get clients details up if they are overdue to be displayed on the webpage.

Claire



A good place to start would be with a brief tutorial. ASP likes to use "ADO" to connect to databases. This tutorial is good if a bit basic.

here is an example of an asp script that opens a db table and writes a webpage:
Expand|Select|Wrap|Line Numbers
  1.  <%
  2. dim conn, rs
  3. set conn=Server.CreateObject("ADODB.Connection")
  4. conn.Provider="Microsoft.Jet.OLEDB.4.0"
  5. conn.Open "c:/inetpub/myDataBase.mdb"
  6. set rs=Server.CreateObject("ADODB.recordset")
  7. rs.Open "SELECT * FROM myTable", conn
  8. response.write "<table border=1><tr>" & vbNewLine
  9. do until rs.eof
  10.    for each x in rs.fields
  11.       response.write "<td>" & rs(x) & "</td>" & vbNewLine
  12.  
  13.    next
  14.  
  15.    rs.movenext
  16.    response.write "</tr><tr>"
  17. loop
  18. response.write "</table>"
  19. %>
Jared
Apr 26 '07 #5
jhardman
3,406 Recognized Expert Specialist
Just not sure how i get clients details up if they are overdue to be displayed on the webpage.

Claire
So your query could be something like
Expand|Select|Wrap|Line Numbers
  1. dim monthAgo
  2. monthAgo = dateAdd("d", date(), -30)
  3. sqlstr = "SELECT * FROM clients WHERE lastPaid < #" & monthAgo & "#"
  4.  
Jared
May 7 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

14
5383
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
14
8980
by: jj | last post by:
Is it possible to call a remote php script from within Access? I'm thinking something like: DoCMD... http://www.domain.com/scripts/dataquery.php DoCmd.OpenQuery "update_data", acNormal, acEdit...
5
7340
by: rob | last post by:
Hi to all. I am pretty new to using Access and am having a problem I hope someone can help me with. I want to access a MS-Access database from a web page. I have managed to get it "sort" of...
0
2601
by: Bill Thom | last post by:
I have a Microsoft Access 2000 (9.0.4402 SR-1) database that I am attempting to launch from a hyperlink using Internet Explorer (Version 6.0.2800.1106). If I attempt to launch the database from...
1
3009
by: Alex | last post by:
Hi, Everyday, I download data from a webpage and manually input data into my MS Access database. I am thinking of automate the routine by a VB script. The webpage I am visiting will return a...
2
1201
by: khan | last post by:
hi guys, I want to search query through a webpage. I want to set search criaria a web text filed same we do for forms {forms]!!. is it possible I could use a webpage text field as a search...
52
9911
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
5
6073
by: trig | last post by:
Please help! I am an ICT teacher at a secondary school and my year 12 (AS Level) group need to create a website where data can be sent from a form to a Microsoft Access database. I am trying...
0
2877
by: gpl666666 | last post by:
I use Microsoft Access to create a webpage I publish this webpage to our company server, it gives two messages when I open the webpage, one is: "This website uses a data provider that may be...
3
2863
by: mtgriffiths86 | last post by:
I have created a query using Microsoft access that will work out the difference between a time that i enter into the database (HH:MM:SS) and then to take away the current time. I have this working...
0
6915
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7054
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.