Database problem
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Database problem

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
peltsu
Guest





Posted: Fri Jan 07, 2005 6:43 pm    Post subject: Database problem Reply with 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
Jorge Jimenez
Guest





Posted: Fri Jan 07, 2005 10:00 pm    Post subject: Re: Database problem Reply with quote

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 Reply with 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
Jorge Jimenez
Guest





Posted: Sun Jan 09, 2005 10:02 am    Post subject: Re: Database problem Reply with quote

....
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 Reply with quote

Thanks Jorge,
I got it. It works now.

Yours
Seppo Peltomaa
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB