ado.net create a table

  • Thread starter Thread starter viki
  • Start date Start date
Hi Paul,
I am still struggling to get the solution. The exact code is very
simple
Dim db_conn As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=d:\users\accessdb\QA\Quality assurance database.mdb")
Dim db_cmd As OleDbCommand
Dim sqlstr As String
db_conn.Open()
sqlstr = "SELECT * INTO qa_temp FROM qa WHERE 1=0;"
db_cmd = New OleDbCommand(sqlstr, db_conn)
db_cmd.ExecuteNonQuery()
db_conn.Close()

and the same error " COuld not create; no modify design permission for
table or query 'qa_temp'"

The database is not in the virtual directory, it is in the separate
folder but in the same server. I have given full access to everyone,
aspnet , iss accounts to the folder as well as the database.

One thing that annoys me is that i was able to update or delete or
even drop particular table in that database. But i was not able to
create a table in the database. is there anything i have to include in
the connection string which would enable me to add a table to the
database.

I would really appreciate any help paul..

Thanks,
viki
 
On 5 Apr 2005 06:39:17 -0700, (e-mail address removed) (viki) wrote:

¤ Hi Paul,
¤ I am still struggling to get the solution. The exact code is very
¤ simple
¤ Dim db_conn As New
¤ OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
¤ Source=d:\users\accessdb\QA\Quality assurance database.mdb")
¤ Dim db_cmd As OleDbCommand
¤ Dim sqlstr As String
¤ db_conn.Open()
¤ sqlstr = "SELECT * INTO qa_temp FROM qa WHERE 1=0;"
¤ db_cmd = New OleDbCommand(sqlstr, db_conn)
¤ db_cmd.ExecuteNonQuery()
¤ db_conn.Close()
¤
¤ and the same error " COuld not create; no modify design permission for
¤ table or query 'qa_temp'"
¤
¤ The database is not in the virtual directory, it is in the separate
¤ folder but in the same server. I have given full access to everyone,
¤ aspnet , iss accounts to the folder as well as the database.
¤
¤ One thing that annoys me is that i was able to update or delete or
¤ even drop particular table in that database. But i was not able to
¤ create a table in the database. is there anything i have to include in
¤ the connection string which would enable me to add a table to the
¤ database.
¤
¤ I would really appreciate any help paul..

I'm beginning to wonder whether your database might be corrupt. Have you tried creating and
importing into a new Access database?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Yeah!! i got it working. Thanks Paul , u are right i imported
everything to a new access database and it worked like a charm. Sorry
for wasting your time for simple things. But i did not realise that it
is corrupted , since it has been working without any problem. May be
if i have tested in some other database , i might have known this..

Any how thanks for everyone for sharing the information..

Thanks,
Viki
 
Back
Top