- <HTML>
-
<Body>
-
<Form Method=Post Action="Insert.asp">
-
ROLL NO. <Input type=text Name=rol><br>
-
Name <Input type=text Name=nm><br>
-
Address <Input type=text Name=adr><br><br>
-
<Input type=submit Value="Submit Info.">
-
</form>
-
-
<%
-
Dim r, n, a, RS, conn, qr
-
-
r = Request.Form("rol")
-
n = Request.Form("nm")
-
a = Request.Form("adr")
-
-
Set conn = Server.CreateObject("ADODB.Connection")
-
conn.Provider = "Microsoft.JET.OLEDB.4.0"
-
conn.Open "c:/students.mdb"
-
-
Set RS = Server.CreateObject("ADODB.Recordset")
-
qr = "INSERT INTO t1(Roll,sNm,Address) Values( "&r&" , ' "&n&" ' , ' "&a&" ')"
-
-
RS.Open qr, conn, 2, 3
-
-
conn.Close
-
set conn= nothing
-
-
%>
-
-
</body>
-
</html>
This program gives foll. error :
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/DB-ex/Insert.asp, line 24
Please help
3 1071
Try the following -
qr = "INSERT INTO t1(Roll,sNm,Address) Values( " & r & " ,' "& n & "','" & a &"')"
Heya, bsayali. Welcome to TSDN!
Please use CODE tags when posting source code:
[CODE=asp]
ASP code goes here.
[/CODE]
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Polar |
last post by:
I am having troubles finding the parse error in this script. I've been
checking for weeks. I am too new to the subject I guess.
I am trying to show a readord and them have a form at the bottom...
|
by: johnnyboy10017 |
last post by:
I am having a hell of a time with what I think is a very simple query:
It won't actually insert a new record into the specified table, but
returns no error, in fact it returns "1" (or true) that...
|
by: jaysonsch |
last post by:
Hello!
I am having some problems with a database query that I am trying to do.
I am trying to develop a way to search a database for an entry and
then edit the existing values. Upon submit, the...
|
by: Nick Truscott |
last post by:
<?
// scoreinput.php - input a match score when match selected from list
?>
<html>
<head>
<basefont face="Verdana">
</head>
<body>
|
by: Mattyboy |
last post by:
Guys
I have built a database with saved queries that runs fine in Access
but when I call it from the web using ASP, an exception occurs. I
have tried multiple ways of testing the databases with...
|
by: Martin Lacoste |
last post by:
Ok, before I headbutt the computer... don't know why when I add
criteria in a query, I get an 'invalid procedure call'. I also don't
know why after searching the help in access, the various access...
|
by: Alan Lane |
last post by:
Hello world:
I'm including both code and examples of query output. I appologize if
that makes this message longer than it should be.
Anyway, I need to change the query below into a pivot table...
|
by: deko |
last post by:
When using OutputTo with a query, the 'File name' window in the 'Output To'
dialog gets populated with the name of the query by default. This makes the
exported file self-describing if the query...
|
by: Arpan |
last post by:
I have always been working with SQL Server 2005 for ASP.NET apps but
due to some reasons, had to revert back to MS-Access 2000.
When I try to insert/update a MS-Access DB table (MDB), ASP.NET...
|
by: Kelii |
last post by:
I've been trying to get this piece to work for a few hours, but have
given up. I hope someone out there can help, I think the issue is
relatively straightforward, but being a novice, I'm stumped....
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |