| Author |
Message |
peltsu
Guest
|
Posted:
Fri Jan 07, 2005 6:43 pm Post subject:
Database problem |
|
|
Hi,
how do I disconnect from a Access database using ADODC ?
I've created a front end to populate a database table with attributes from a drawing and view or even edit them on a form. This works fine, but if I change some of the attributes in a drawing I have to update the database table. It only works if I close my program. Autocad will not overwrite the existing table, even if I give it a permission. I suppose disconnecting from a database will do the trick - but how is that accomplished ?
Yours
Seppo Peltomaa
|
|
| Back to top |
|
 |
Jorge Jimenez
Guest
|
Posted:
Fri Jan 07, 2005 10:00 pm Post subject:
Re: Database problem |
|
|
The problem might be in your recordset.
Make sure that is updateable
Myrecordset.LockType = adLockOptimistic
before you open it.
--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
"peltsu" <nospam@address.withheld> wrote in message
news:11240440.1105105439602.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Hi,
how do I disconnect from a Access database using ADODC ?
I've created a front end to populate a database table with attributes from
a drawing and view or even edit them on a form. This works fine, but if I
change some of the attributes in a drawing I have to update the database
table. It only works if I close my program. Autocad will not overwrite the
existing table, even if I give it a permission. I suppose disconnecting
from a database will do the trick - but how is that accomplished ?
Yours
Seppo Peltomaa |
|
|
| Back to top |
|
 |
peltsu
Guest
|
Posted:
Sat Jan 08, 2005 2:39 pm Post subject:
Re: Database problem |
|
|
Thanks Jorge,
I tried it, but in vain. The problem might be that the DataGrid where the records go does not "accept" a recordset as a datasource from code. In properties window it will take adodc1 control. So I suppose that the connection is on if I can not change that value or disconnect adodc1. It seems that I do not have enough knowledge to do this kind of things, but I try :)
yours
Seppo Peltomaa
|
|
| Back to top |
|
 |
Jorge Jimenez
Guest
|
Posted:
Sun Jan 09, 2005 10:02 am Post subject:
Re: Database problem |
|
|
....
myrecordset.open sqlstring
Set DataGrid1.Datasource = myrecordset
....
--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
"peltsu" <nospam@address.withheld> wrote in message
news:33112455.1105177188477.JavaMail.jive@jiveforum1.autodesk.com...
| Quote: | Thanks Jorge,
I tried it, but in vain. The problem might be that the DataGrid where the
records go does not "accept" a recordset as a datasource from code. In
properties window it will take adodc1 control. So I suppose that the
connection is on if I can not change that value or disconnect adodc1. It
seems that I do not have enough knowledge to do this kind of things, but I
try :)
yours
Seppo Peltomaa |
|
|
| Back to top |
|
 |
peltsu
Guest
|
Posted:
Mon Jan 10, 2005 4:51 pm Post subject:
Re: Database problem |
|
|
Thanks Jorge,
I got it. It works now.
Yours
Seppo Peltomaa |
|
| Back to top |
|
 |
|
|
|
|