Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 18th, 2002, 04:06 PM
aj2000 aj2000 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 1 aj2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
create table in ms access using ado

hi, im trying to automate the creation of a table in ms access through ASP ado--can i embed the sql in the adodb command object to do this?..does it support the create command.. i keep getting a syntex error w/ the following code:

=======================================
dim strConnectionform4

strConnectform4 = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Inetpub\wwwroot\datastores\calander.mdb; Persist Security Info=False"

Dim objCommandform4, objRSform4, qrystrform4, intnoofrecs4
Set objCommandform4 = Server.CreateObject("ADODB.Command")

qrystrform4 = "create table test_copy as select * from cal_template"

objCommandform4.ActiveConnection = strConnectform4
objCommandform4.CommandText = qrystrform4
objCommandform4.CommandType = adCmdText

set objRSform4 = objCommandform4.Execute

set objCommandform4 = Nothing

====================================

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in CREATE TABLE statement.
/main/reg_comp.asp, line 55

Reply With Quote
  #2  
Old December 30th, 2002, 12:28 PM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
no, that isn't going to work. you can't create a table that way. the select statement isn't going to return:

(field, field, field) values (value, value, value)

it will return a record/recordset. if ou want to do it that way, you'll have to put your select data into a recordset and then sort it out into a string to use for your create table statement

Reply With Quote
  #3  
Old January 31st, 2003, 03:40 PM
jacobeiler jacobeiler is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Orlando, FL
Posts: 3 jacobeiler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Create SQL DB Programmatically in VB.NET with ADO

Check this article out:

URL

Reply With Quote
  #4  
Old August 20th, 2004, 08:03 PM
N VENKATARAMAN N VENKATARAMAN is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 N VENKATARAMAN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post create table in ms access using ADO

Quote:
Originally Posted by jacobeiler
Check this article out:

URL

Try this command for creating Table :
qrystrform4 = "select * from cal_template into test_copy"

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > create table in ms access using ado


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT