Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / October 2003



Tip: Looking for answers? Try searching our database.

creating Table using SQL statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
learnvb - 31 Oct 2003 03:08 GMT
As a learner I am grateful to all who has helped me in my learning
process. Here is another question (Simple) that I would like to post.
I will appreciate your reply very much.

I want to acess data in csv format with the header containing the
field names. I would like to use these field names while creating
Table using SQL statements. How can I achieve this?

For example:
After reading the csv file we get following into the VB6

x=date
y=incoming students
z=outgoing students
so,
Fieldname(0).name="date"
Fieldname(1).name="Incoming students"
Fieldname(2).name="outgoing students"

Now I would like create Table using SQL statement. e.g.

cmd.CommandText="CREATE TABLE (x DATE/TIME PRIMARY KEY,Y char(10),Z
char(10))"
cmd.Execute, ,adCmdText

I find x, y,z cannot take the values as assigned. Is there someway
out?

thanking you, always
Lee Weiner - 31 Oct 2003 03:30 GMT
cmd.CommandText="CREATE TABLE (" & x & " DATE/TIME PRIMARY KEY, " & _
              y & " char(10), " & z & " char(10))"

Lee Weiner
lee AT leeweiner DOT org

>As a learner I am grateful to all who has helped me in my learning
>process. Here is another question (Simple) that I would like to post.
[quoted text clipped - 25 lines]
>
>thanking you, always
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.