this is my code -
dim i
-
dim checkboxValue
-
dim TextBoxValue
-
-
dim Count
-
dim Count1
-
dim postion
-
dim postion1
-
position=0
-
postion1=0
-
i=0
-
Checkbox1= Request.Form("same")
-
strdate=Request.Form("Date")
-
a=Split(strdate ,",")
-
b=Split(Checkbox1,",")
-
if strdate<>"" and Checkbox1<>"" then
-
TextBoxValue=UBound(a)
-
checkboxValue=UBound(b)
-
'Response.Write(TextBoxValue)
-
if TextBoxValue > checkboxValue then
-
for i=0 to TextBoxValue
-
Set objRIMSConn1 = Server.CreateObject("ADODB.Connection")
-
objRIMSConn1.Open RIMS_CONNECT
-
objRIMSConn1.Execute "Insert into Eot_returned(Asset_id,Date) values("+b(i)+",'"+a(i)+"');"
-
next
-
objRIMSConn1.Close
-
Set objRIMSConn1 = nothin
-
else
-
for i=0 to checkboxValue
-
Set objRIMSConn1 = Server.CreateObject("ADODB.Connection")
-
objRIMSConn1.Open RIMS_CONNECT
-
objRIMSConn1.Execute "Insert into Eot_returned(Asset_id,Date) values(" +b(i)+ "," +a(i)+ ")"
-
next
-
end if
-
-
Response.Write("<script language='javascript' type='text/javascript'> alert('The value hass been Inserted'); </script>")
-
else
-
Response.Write("<script language='javascript' type='text/javascript'> alert('Do you want to return any asset'); </script>")
-
end if
Erro:Near ")" please an u people help me???????????
18 2192 Rabbit 12,516
Recognized Expert Moderator MVP
You've only defined one field to insert into but you include two values.
yes i can but the problem is in two its giving an error
Rabbit 12,516
Recognized Expert Moderator MVP
I have no idea what you're saying. I'm saying that you can't specify two values when you only specify one column.
you have no space between ")" and "values"
if you want any help, it's better to post the full error message.
you can get the error message with
response.write err.description
thnaks u guys and mlutinett i will post the full error message
jhardman 3,406
Recognized Expert Specialist
Rabbit is definitely right: the insert statement has the wrong number of fields.
If you were inserting into just one field the command would look like this: - insert into eot_returned (asset_id) values (4)
but if you were inserting into two different fields, the command would look like this: - insert into eot_returned (asset_id, asset_name) values (4, 'John')
If you were trying to insert into one field but two different records, you would need two different insert statements - insert into eot_returned (asset_id) values (4);
-
insert into eot_returned (asset_id) values (5)
the way you have it is definitely wrong, but I can't tell which you are trying to do.
Jared
jhardman i have changed the code and still it is giving me an error the following is the error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ')'.
, line 876
OKAY now the values are going to the database but its still displaying the same page
Rabbit 12,516
Recognized Expert Moderator MVP
What do you mean it displays the same page?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Trevor Sather |
last post by:
------=_NextPart_000_004D_01C3456C.66EFEC50
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hello
The following query used to work when I was using an Access database, but
now that I've moved to MySQL I get a syntax error when I try and run it:
|
by: Nicolas Fleury |
last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment
welcomed (even about English mistakes).
PEP: XXX
Title: Specialization Syntax
Version: $Revision: 1.10 $
Last-Modified: $Date: 2003/09/22 04:51:49 $
Author: Nicolas Fleury <nidoizo at gmail.com>
Status: Draft
Type: Standards Track
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by including the -q64 option in
xlC compiler. And we are able to link all these libraries to one of
the main applications and generate an executable. SKLoader. But, when
we try to run this main executable, we are getting the following
errors:
|
by: obastard |
last post by:
Hi
Having a problem with a ms sql 2000 server. The script below was
created i SQL manager 2005 lite and gives a syntax error near '('
ALTER TABLE .
ADD CONSTRAINT
PRIMARY KEY CLUSTERED ()
WITH (
PAD_INDEX = OFF,
IGNORE_DUP_KEY = OFF,
|
by: ielmrani via SQLMonster.com |
last post by:
Hi Everyone,
I really tried to not post this question but I gave up. I tried brackets,
parenth...etc but nothing worked. I get this error message: Incorrect syntax
near the keyword 'THEN'. Please help, I am learning SQL Server.
thanks in advance.
Ismail
use mis
select CLAIM_DETAILS_HCVW.INTEREST, CLAIM_DETAILS_HCVW.NET, CLAIM_HMASTERS_VS.
| |
by: gatorfalcon |
last post by:
I'm using mysqli_multi_query to run multiple queries concatenated with a semicolon that I set using the HEREDOC format.
What's weird is that this works fine on my development system on my laptop (a PC running PHP 5.x and mysql5.x). When I bring the code onto a linux system (with my ISP), the code chokes with a syntax error near the first semicolon. I believe they too are running PHP 5.x and mysql 5.x.
Any clues what's going on? I mean,...
|
by: Shrutisinha |
last post by:
I am getting this error in unix ..
syntax error near unexpected token `('
when i am running my parser , can anybody help me plzz .. i am new to all this
thanks
|
by: silambu |
last post by:
hi,can anybody tell reason for getting syntax error near , while either updating or inserting records in table
|
by: bhunesh |
last post by:
hey ,
i m getting error listed below plz help me
/virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/new_mcx.pl: line 14: syntax error near unexpected token `"/usr/bin/wget -O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53"'
#!/usr/bin/perl
#Purpose : To create MCX DAT file from mcx feed coming from mcxindia.com
#Author : Yatin Patil
|
by: cluce |
last post by:
I am getting a syntax error but I cant seem to spot it. need help with this. Its when I click the save button that fires my SQL UPDATE query.
thansk in advance
'module level declarations
Dim rsNames As ADODB.Recordset
Dim cnDb As ADODB.Connection
Dim strConnection As String
Dim blnAddMode As Boolean
|
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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...
| |
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
| |