Runtime Error 3611

G

Guest

runtime error 3611 - cannot execute data definition statements on linked data
sources.

i have a FE & BE

i have the following code as part of my startup code

Public Function AddRegistrationDetails()

DoCmd.RunSQL "ALTER TABLE tblDatabaseInformation ADD COLUMN
[RegistrationDate] DATE;"

End Function

Any ideas on the error message?
 
A

Allen Browne

You will need to OpenDatabase on the back end mdb, and Execute the DDL query
statement on that db.

If Execute is new, see:
Action queries
at:
http://allenbrowne.com/ser-60.html

Instead of:
Set db = dbEngine(0)(0)
you will need:
Set db = OpenDatabase("C:\MyFolder\MyFile.mdb")
and after the MsgBox:
db.Close
 
G

Guest

Many thanks allen

Allen Browne said:
You will need to OpenDatabase on the back end mdb, and Execute the DDL query
statement on that db.

If Execute is new, see:
Action queries
at:
http://allenbrowne.com/ser-60.html

Instead of:
Set db = dbEngine(0)(0)
you will need:
Set db = OpenDatabase("C:\MyFolder\MyFile.mdb")
and after the MsgBox:
db.Close

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

StuJol said:
runtime error 3611 - cannot execute data definition statements on linked
data
sources.

i have a FE & BE

i have the following code as part of my startup code

Public Function AddRegistrationDetails()

DoCmd.RunSQL "ALTER TABLE tblDatabaseInformation ADD COLUMN
[RegistrationDate] DATE;"

End Function

Any ideas on the error message?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top