 |
| ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 27th, 2004, 09:22 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
SQL Exception
[SqlException: Line 1: Incorrect syntax near ','.]
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +180
DataTeam.user.cmdsave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\DataTeam\user.aspx. vb:1652
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
|
|

July 27th, 2004, 09:31 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Could you provide some more information??
-What is the sql string you are trying to execute?
|
|

July 27th, 2004, 10:02 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I was trying to execute an insert command on a database. the code that i written is
Dim dbcmd1 As SqlClient.SqlCommand
Dim dbcon1 As SqlClient.SqlConnection
strfile = "Server=sos50\sos50;uid=intranetu;pwd=intranetu;da tabase=intranet"
dbcon1 = New SqlClient.SqlConnection(strfile)
dbcon1.Open()
dbcmd1 = New SqlClient.SqlCommand(fsqlstr, dbcon1)
dbcmd1.ExecuteNonQuery()
dbcon1.Close()
Quote:
quote:Originally posted by planoie
Could you provide some more information??
-What is the sql string you are trying to execute?
|
|
|

July 27th, 2004, 12:26 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Again,
Quote:
|
quote:-What is the sql string you are trying to execute?
|
I'm sure the error is in the query, but you haven't provided it.
|
|

July 27th, 2004, 01:28 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The sql string is
Insert into hrhoovers(ID,Suffix,Company_Name,HQ_Address1,HQ_Ad dress2,HQ_City,HQ_State_Province,HQ_Postal_Code,HQ _Country,HQ_Main_Fax,Company_Type,Symbol,Exchange, Employees,Employee_Growth,Revenue_$_million,Revenu e_Growth,Primary_Industry,SIC_Code,NAICS_Code,WebA ddress,First_Name,Middle_Initial,Last_Name,Title,H Q_Main_Phone,EMAIL,ALTEMAIL) values(5758,'','Glenn O. Hawbaker, Inc.','1952 Waddle Rd.','','State College','PA','16803','United States','814-237-5348','Private','','','800','--','100','--','Commercial & Heavy Construction','1542;1611;1622;1629','236220;237310 ;237990','http://www.goh-inc.com',,'pavan','kumar','Paruchuri','Technical Lead','9845928872','[email protected]','p [email protected]')
Quote:
quote:Originally posted by planoie
Again,
Quote:
|
quote:-What is the sql string you are trying to execute?
|
I'm sure the error is in the query, but you haven't provided it.
|
|
|

July 27th, 2004, 02:17 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hello,
I think your issue is here:
'http://www.goh-inc.com',,'pavan','kumar','Paruchuri','Technical
After the web link, you have two commas. You need to have a value there, either:
,'',
or
,NULL,
Brian
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| COM Exception |
muralidharan.d |
VS.NET 2002/2003 |
0 |
August 7th, 2007 02:49 PM |
| cach(Exception e) |
surendraparashar |
C# 2005 |
2 |
June 26th, 2007 05:03 PM |
| Exception |
Ochi |
C# |
1 |
January 15th, 2006 11:38 PM |
| CH19 Exception on example |
kula |
BOOK: Beginning JavaServer Pages |
1 |
May 21st, 2005 02:33 AM |
| Unhandled Exception |
stu9820 |
ASP.NET 1.0 and 1.1 Basics |
11 |
January 14th, 2004 05:55 PM |
|
 |