•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 373,370 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,816 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 930 | Replies: 4
![]() |
•
•
Join Date: Jan 2008
Location: +3.187105,+101.645363
Posts: 394
Reputation:
Rep Power: 1
Solved Threads: 0
Hello...
I have a problem here...
How do i make an asp using database using this script...
Your help is much appreciated...
I have a problem here...
How do i make an asp using database using this script...
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<div id="Layer1" style="position:absolute; width:883px; height:749px; z-index:1; left: 71px; top: 65px;">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<table width="554" height="395">
<tr>
<td width="174"><div align="right">Gambar : </div></td>
<td width="364"><form name="form1" method="post" action="">
<input name="Gambar" type="text" id="Gambar">
<input name="Browse" type="reset" value="Browse">
</form></td>
</tr>
<tr>
<td><div align="right">Nama Pegawai : </div></td>
<td><form name="form2" method="post" action="">
<input type="text" name="textfield">
</form></td>
</tr>
<tr>
<td><div align="right">Jawatan : </div></td>
<td><form name="form3" method="post" action="">
<input type="text" name="textfield2">
</form></td>
</tr>
<tr>
<td><div align="right">Gelaran/Posisi : </div></td>
<td><form name="form4" method="post" action="">
<input type="text" name="textfield3">
</form></td>
</tr>
<tr>
<td><div align="right">Bahagian : </div></td>
<td><input type="text" name="textfield4"></td>
</tr>
<tr>
<td><div align="right">Cawangan/Unit : </div></td>
<td><form name="form5" method="post" action="">
<input type="text" name="textfield5">
</form></td>
</tr>
<tr>
<td><div align="right">E-mail : </div></td>
<td><form name="form6" method="post" action="">
<input type="text" name="textfield6">
</form></td>
</tr>
<tr>
<td><div align="right">Telefon : </div></td>
<td><p>Pejabat :
<input type="text" name="textfield7">
</p>
<p>Lain-lain :
<input type="text" name="textfield8">
</p>
</td>
</tr>
<tr>
<td><div align="right">Ringkasan Tugas : </div></td>
<td><form name="form7" method="post" action="">
<textarea name="textarea"></textarea>
</form></td>
</tr>
</table>
<div id="Layer2" style="position:absolute; width:110px; height:50px; z-index:2; left: 281px; top: 569px;">
<form name="form8" method="post" action="">
<input type="submit" name="Submit" value="Submit">
</form>
</div>
<p> </p>
<div id="Layer3" style="position:absolute; width:137px; height:49px; z-index:2; left: 416px; top: 571px;">
<form name="form9" method="post" action="">
<input type="Reset" name="Reset" value="Clear">
</form>
</div>
</div>
</div>
</body>
</html>Your help is much appreciated...
•
•
Join Date: Sep 2007
Posts: 1,054
Reputation:
Rep Power: 3
Solved Threads: 61
You need to connect to your MS Access database, open a new recordset, then insert the information. It's an easy process, however, you should always do validation on what you're inserting, which is what makes it a bit more difficult and lengthy.
Find a connection string at : http://www.connectionstrings.com
Then your code should be something like this:
Just keep in mind, interger fields (Int, Bigint, etc.) do not need single quotes.
Find a connection string at : http://www.connectionstrings.com
Then your code should be something like this:
Dim strDbConnection
Dim objConn
Dim strSQL
strDbConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\test.mdb;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open(strDbConnection)
strSQL = "INSERT INTO persons (fullname, birthDate) VALUES ('" & Request.Form("fieldname") & "', '" & Request.Form("fieldname") & "')"
objConn.Execute(strSQL)
objConn.Close()
Set objConn = Nothing•
•
Join Date: Jan 2008
Location: +3.187105,+101.645363
Posts: 394
Reputation:
Rep Power: 1
Solved Threads: 0
•
•
Join Date: Sep 2007
Posts: 11
Reputation:
Rep Power: 1
Solved Threads: 0
well mail me yr question... _saru@hotmail.com
=========
=========
•
•
•
•
Hello...
I have a problem here...
How do i make an asp using database using this script...
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body> <div id="Layer1" style="position:absolute; width:883px; height:749px; z-index:1; left: 71px; top: 65px;"> <div align="center"> <p> </p> <p> </p> <p> </p> <table width="554" height="395"> <tr> <td width="174"><div align="right">Gambar : </div></td> <td width="364"><form name="form1" method="post" action=""> <input name="Gambar" type="text" id="Gambar"> <input name="Browse" type="reset" value="Browse"> </form></td> </tr> <tr> <td><div align="right">Nama Pegawai : </div></td> <td><form name="form2" method="post" action=""> <input type="text" name="textfield"> </form></td> </tr> <tr> <td><div align="right">Jawatan : </div></td> <td><form name="form3" method="post" action=""> <input type="text" name="textfield2"> </form></td> </tr> <tr> <td><div align="right">Gelaran/Posisi : </div></td> <td><form name="form4" method="post" action=""> <input type="text" name="textfield3"> </form></td> </tr> <tr> <td><div align="right">Bahagian : </div></td> <td><input type="text" name="textfield4"></td> </tr> <tr> <td><div align="right">Cawangan/Unit : </div></td> <td><form name="form5" method="post" action=""> <input type="text" name="textfield5"> </form></td> </tr> <tr> <td><div align="right">E-mail : </div></td> <td><form name="form6" method="post" action=""> <input type="text" name="textfield6"> </form></td> </tr> <tr> <td><div align="right">Telefon : </div></td> <td><p>Pejabat : <input type="text" name="textfield7"> </p> <p>Lain-lain : <input type="text" name="textfield8"> </p> </td> </tr> <tr> <td><div align="right">Ringkasan Tugas : </div></td> <td><form name="form7" method="post" action=""> <textarea name="textarea"></textarea> </form></td> </tr> </table> <div id="Layer2" style="position:absolute; width:110px; height:50px; z-index:2; left: 281px; top: 569px;"> <form name="form8" method="post" action=""> <input type="submit" name="Submit" value="Submit"> </form> </div> <p> </p> <div id="Layer3" style="position:absolute; width:137px; height:49px; z-index:2; left: 416px; top: 571px;"> <form name="form9" method="post" action=""> <input type="Reset" name="Reset" value="Clear"> </form> </div> </div> </div> </body> </html>
Your help is much appreciated...
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
.net access ajax asp avatar backup breach business code combo custom daniweb data data protection database design developer development dom dropdownlist europe feed government hacker hp ibm ip medicine microshaft microsoft module ms msdn net news normalization office reuse security server skin software sql survey theme vista weather web xml xoap
- ASP To Access (ASP)
- how to connect ms access with asp vbscript (ASP)
- Tooltip for ASP database query result (ASP)
- are C#, VB.NET, ASP.NET part of new VS.NET? (ASP.NET)
- Manipulating A Database (C#)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Can not fill dataset from database on other computer with ASP .NET and MS Access (Visual Basic 4 / 5 / 6)
- Snyc'n Local SQL database online (MS SQL)
- ASP and SQL ? (MS SQL)
Other Threads in the ASP Forum
- Previous Thread: Image Uploading
- Next Thread: Need this help urgent please



Linear Mode