CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Appending data from one table to another in Access/ASP

Print topic Send  topic

Author Message
SteveS

Posts: 41
Posted: 04/01/2004, 5:32 AM

Hi,

I have imported data from a CSV file into a temporary table, however, I cannot seem to get the data from the temporary table to the 'master' table. Code as follows:

<%
'Making a connection with the database

set objConn= Server.CreateObject("ADODB.Connection")

strDBPath = Server.MapPath("./test.mdb")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"


' Path of the CSV file
Dim csv_path
csv_path = Server.MapPath("./") & "\"

On Error Resume Next
SQL = "DROP TABLE temp"
objConn.Execute SQL

SQL = "SELECT * INTO temp FROM [import.csv] IN """ & csv_path & """ ""TEXT;"""

'SQL = "INSERT INTO temp SELECT * FROM [import.csv] IN """ & csv_path & """ ""TEXT;"""

'Executing the SQL Statement
objConn.Execute SQL

' Transfer data in temp table to main pupil_names table

<<< what should go here?? >>>



objConn.Close
Set objConn = Nothing
response.write("End of procedure")
%>
View profile  Send private message
peterr


Posts: 5971
Posted: 04/01/2004, 12:19 PM

Since this is a generic question it may be faster for you to lookup an answer, rather than wait for it.
See:
http://www.google.com/search?q=sql+copy+records+between+tables+access
http://groups.google.com/groups?q=sql%20copy%20records%...tables%20access
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.