|
-
Sep 14th, 2005, 01:59 AM
#1
Thread Starter
Hyperactive Member
Create Table
Wasn't the fallowing code creates a phisically visible table...???
VB Code:
Set d = w.OpenDatabase("C:\Documents and Settings\Administrator\Desktop\db11.mdb")
Set rst = d.OpenRecordset("query1")
rst.MoveFirst
While Not rst.EOF
Set t = d.CreateTableDef(rst(0))
With t
.Fields.Append .CreateField("srikanth", dbText)
End With
rst.MoveNext
Set t = Nothing
Wend
then y iam uanble to see how is my tables looks like...the code was running with out any error....please help in this issue.....its a bit urgent..pleasee..
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Sep 14th, 2005, 02:15 AM
#2
Re: Create Table
I think you need to append the TableDef to the database:
VB Code:
Set d = w.OpenDatabase("C:\Documents and Settings\Administrator\Desktop\db11.mdb")
Set rst = d.OpenRecordset("query1")
rst.MoveFirst
While Not rst.EOF
Set t = d.CreateTableDef(rst(0))
With t
.Fields.Append .CreateField("srikanth", dbText)
End With
rst.MoveNext
[color=red]d.TableDefs.Append t[/color]
Set t = Nothing
Wend
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Sep 14th, 2005, 02:18 AM
#3
Thread Starter
Hyperactive Member
Re: Create Table
yes...
that is what the mistake i made...ny how...thanx for u r quick reply pnish
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Sep 14th, 2005, 02:19 AM
#4
Re: Create Table
nagasrikanth,
For a good example look in my signature for Free VB Source Code and download the Import DBase IV files into an Access 2000 Database project.
This will help you with creating a database along with tables and fields.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|