Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATE TEMPORARY TABLE access 2003

Status
Not open for further replies.

PWise

Programmer
Dec 12, 2002
2,633
US
Code:
Dim mydb As Database
Set mydb = CurrentDb
mydb.Execute "CREATE TEMPORARY TABLE  Students(StudentName text)"

What is wrong with the above code?
I get this error
Syntax error in CREATE TABLE statement.
 
There is no temporary table in msaccess ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Well in which post are you wrong?

because i get get it to work

msaccess help said:
CREATE TABLE Statement
...
CREATE [TEMPORARY] TABLE table (field1 type [(size)] [NOT NULL] [WITH COMPRESSION | WITH COMP] [index1] [, field2 type [(size)] [NOT NULL] [index2] [, ...]] [, CONSTRAINT multifieldindex [, ...]])

....

Remarks
....
When a TEMPORARY table is created it is visible only within the session in which it was created. It is automatically deleted when the session is terminated. Temporary tables can be accessed by more than one user.

...

 
Sorry sb

I can not get it to work
 
it is visible only within the session in which it was created
So, you probably can't use CurrenDb but a persistent connection to the database ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for replying

What will Constitute a persistent connection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top