Hi Buddzy
Can you plz help to connect to Access DataBase input from HTML form using insert statement. I am still new on programming with html here is my code .
[HTML]<html>
<head>
<title>Entitl ed Document</title>
<script language="JavaS cript" >
function getSubmit()
{
var name1 = eval(document.f orm1.names.valu e)
var cn = new ActiveXObject(" ADODB.Connectio n");
var strConn = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source = G:\clientDB.mdb ";
cn.Open(strConn );
var rs = new ActiveXObject(" ADODB.Recordset ");
// I need help for the following line ("' + name1 +' " )
var SQL = "insert into Customers values( "' + name1 +' " )";
rs.Open(SQL, cn);
//alert(rs(0));
rs.Close();
cn.Close();
}
</script>
</head>
<body>
<FORM name="form1" action="mailto: email@domaine.c om" method="post">
<input type="text" name="names" />
<input type="button" value="submit" onclick="getSub mit()"/>
</form>
</body>
</html>[/HTML]
regards,
Mkhize
3 11619
Hi Buddzy
[IMG]C:\Documents and Settings\Develo per\My Documents\My Pictures\IMG_10 78.JPG[/IMG] plz help to connect to Access DataBase input from HTML form using insert statement. I am still new on programming with html here is my code .
[HTML]<html>
<head>
<title>Entitl ed Document</title>
<script language="JavaS cript" >
function getSubmit()
{
var name1 = eval(document.f orm1.names.valu e)
var cn = new ActiveXObject(" ADODB.Connectio n");
var strConn = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source = G:\clientDB.mdb ";
cn.Open(strConn );
var rs = new ActiveXObject(" ADODB.Recordset ");
// I need help for the following line ("' + name1 +' " )
var SQL = "insert into Customers values( "' + name1 +' " )";
rs.Open(SQL, cn);
//alert(rs(0));
rs.Close();
cn.Close();
}
</script>
</head>
<body>
<FORM name="form1" action="mailto: email@domaine.c om" method="post">
<input type="text" name="names" />
<input type="button" value="submit" onclick="getSub mit()"/>
</form>
</body>
</html>[/HTML]
regards,
Mkhize
acoder 16,027
Recognized Expert Moderator MVP
On line 17, you have the single and double quotes mixed up.
acoder 16,027
Recognized Expert Moderator MVP
Threads merged. Please do not double post.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andras Gilicz |
last post by:
Hi VB fans
I'm working on a relatively large project in VB6 with about a dozen
forms, including graphs, labels, text boxes, etc. The software itself
is actually a flow simulator with more or less complex technical
calculations, several input variables. I would like to equipp the
starting panel with the usual New, Open, Save, Save As, Close etc.
menus (like in Excel, or Word, etc.) What is the best way to
accomplish Save, or Save As?...
|
by: LC's No-Spam Newsreading account |
last post by:
I have the following arrangement working under Netscape 3 / Unix, IE6 /
Win and Konqueror / Linux, but NOT under Netscape 7 Unix or Mozilla
Linux (silently fails) nor under Netscape 4 Unix (fails with message
"access disallowed from scripts at XXXX to documents at another
domain").
1) I have a frameset http://host/PATH/pinco,html in whose HEAD I
define javascript functions like :
function changeItem(i,v) {
|
by: Glenn M |
last post by:
I have a shared XML file on a server .
i also have one xslt file that performs a simple transform on in to
view the data.
now i want to have another page that lets users modify the shared xml
file via some editable controls such as text boxes , option boxes etc.
how can i implment this , should i use another xslt file with <INPUT>
controls . if so how can i save the result back using the asp.net
|
by: david.lindsay.green |
last post by:
Hello all, I am quite new a web scripting and making web pages in
general and I have stumbled across a problem I have as yet been unable
to solve. I am trying to take the contents of a textarea box and save
it to a file. This step is not to hard however the contents of the
textarea is mostly latex source so it contains just about every special
character you can imagine. My question is this, how do I save an exact
copy of the textarea...
|
by: empiresolutions |
last post by:
Hello fellow code junkies,
I am using the "Ajax dynamic list" http://dhtmlgoodies.com/index.html?whichScript=ajax-dynamic-list and i think its the best out there. I have found a compatibility issue maybe one of you can help me out on.
In this html i use a text field to collect info. when a user types, *ajax_showOptions()* shows the option perfectly. once an item is selected and i move from the field, *makeRequest()*, my set variable to...
| |
by: Angus |
last post by:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of html is:
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
|
by: underscore |
last post by:
gud day to all TSD.
if i run the code below which is HTML combine with php. my problem encoutered in php code. it will automatically save all blank textbox i declare in php to my database using mysql if i will run this page.
please correct my problem in my code.
thnx again...
|
by: kiranbabu |
last post by:
<html>
<head>
<style type="text/css">
h2{color:#A02820}
</style>
</head>
<script language=javascript>
|
by: irfanshariffa |
last post by:
<html>
<head>
<script type="text/javascript" language="javascript">
function validate()
{
if (document.form.fname.value=="")
{
alert("Enter your Name");
document.form.fname.focus();
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |