472,353 Members | 1,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Access Database Query to run in a webpage using ASP

20
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 2471
jhardman
3,406 Expert 2GB
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
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 Expert 2GB
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
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 Expert 2GB
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
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...
14
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...
5
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...
0
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...
1
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...
2
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...
52
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...
5
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...
0
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:...
3
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.