Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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
 
Old March 19th, 2005, 03:16 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default is there any expert who can help me

i m using the access database and i m importing the data form the excel sheet and send it to the access. in the access database i want to insert the date which is in the string format.

Here is my code i dont know what is the probelm

do While NOT ExcelRS.EOF
'SDate = ExcelRS(0)
'SDate = Day(SDate)
'SDate = Month(SDate)&"/"& SDate
'SDate = SDate &"/"& year(SDate)
'SDate = CDate(SDate)
SDate = ExcelRs(0)
'response.Write(SDate)
'Response.End()
'insert1 = "INSERT INTO surya (SDate) VALUES (#01/03/05#)"
insert = "INSERT INTO surya (SDate) VALUES ("& SDate &")"
'response.Write(insert1)
'"&SDate&"
'response.Write(insert)
'response.End()
objConn.Execute(insert)
ExcelRS.MoveNext
loop

when i run this code it through the error syntax error in insert statement


help me please


$urya
 
Old March 24th, 2005, 10:46 PM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default

insert = "INSERT INTO surya (SDate) VALUES ("& SDate &")"

correct:

insert = "INSERT INTO surya (SDate) VALUES ('"& SDate &"')"






Similar Threads
Thread Thread Starter Forum Replies Last Post
The expert programmers take a look ojbrowser Visual Studio 2005 0 August 12th, 2008 07:04 AM
I have a question about Chapter04 in Expert... aeroboy32000 VB Databases Basics 1 November 1st, 2007 03:23 PM
hi expert! Can u give me solution for this???? jasdeephere ASP.NET 1.0 and 1.1 Professional 1 February 10th, 2007 02:16 AM
Select Expert Not Working bclick Crystal Reports 0 October 3rd, 2006 02:14 PM
Sql Query Expert! itHighway Classic ASP Basics 1 June 5th, 2005 11:00 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.