473,837 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ 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 2596
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.Buff er=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.Cre ateObject("ADOD B.connection")
set rs=Server.Creat eObject("ADODB. recordset")
conn.Provider=" Microsoft.Jet.O LEDB.4.0"
conn.Open(Serve r.Mappath("phon ebook.mdb"))
fln=request("fi nd_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
5430
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 7.2 environment, the choices the optimizer makes often seem flaky. But this last example really floored me. I was hoping someone could explain why I get worse response time when the optimizer uses two indexes, than when it uses one. Some context:
14
9071
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 ..... So the PHP script does something on the server database, then when a linked table is viewed within access, the data changes have been made?
5
7359
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 working using MS-Access's 'data access page' function as it were. This creates a web page that is linked to a database table. The problem that I have is that if data in the dbase is changed, it does not immediately reflect
0
2616
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 the webpage with the hyperlink using Netscape, the database opens fine. If I attempt to launch the database from the webpage with the hyperlink using Internet Explorer, the database does not open. When I open Task Manager and check the PROCESS...
1
3042
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 csv file, with only one row. In this row, there are several columns of data. I would like to add these data as a NEW row in my data base.
2
1219
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 critatia. I am using Dreamweaver mx to make webpage.
52
10014
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 2005, and, since he already has licenses for Office Pro 2002, he wants to upgrade to that. I've been saying that we need to upgrade to Access 2003, not 2002, even if Office is kept at 2002. We are also looking to do a fair amount of...
5
6087
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 to do this in my own time and then hopefully teach them how to do it. I have installed IIS on my machine and have followed a few web
0
2898
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 unsafe. If you trust the website, click ok, otherwise click cancel" Another msg is: "This website is using your identity to access a data source. If you trust this website click ok to continue, otherwise click cancel" I have to click OK for both...
3
2888
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 inside the access database but i cannot take it from the database and display the result in my webpage. The SQL query i get after creating my query in access is: SELECT Flights.Depart_Time, Time() AS , IIf(>Time(),"Will Depart In","Should Have...
0
9833
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10562
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10617
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6989
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5666
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4469
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 we have to send another system
2
4036
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3122
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.