Database and VB 
Author Message
 Database and VB

Is it a good Idea to create a dll in VB for the functions that interact with
Database?
I build a Dll for that and now everytime when I go to other machine, other
than registering the DLL I get different automation error.
So I was just wondering that is my approach wrong?

Thanks
Trupti



Sat, 24 May 2003 03:00:00 GMT  
 Database and VB
Are you installing the dll from a setup program?  And if so are you
including the version of MDAC that runs on teh developement machine?  Also
if your dll depends on a DSN that will need to be there.  And if you are
using SQL7 you will need to run cliconfig on the client you are installing
to.

Other than that what are the errors you are getting?

Regards,
David


Quote:
> Is it a good Idea to create a dll in VB for the functions that interact
with
> Database?
> I build a Dll for that and now everytime when I go to other machine, other
> than registering the DLL I get different automation error.
> So I was just wondering that is my approach wrong?

> Thanks
> Trupti



Sat, 24 May 2003 03:00:00 GMT  
 Database and VB
Well the way I did is open a Vb new project with Activex DLL. That's it.
Then I wrote my code.
Actually I am not a database person. Somebody else created a project (.exe)
and I had to use that code. So I thought each time taking his code and doing
cutting and pasting ( which is error prone ) let's make a Dll. I read a bit
( Not thoroughly ) and created a dll. The dll worked fine on my machine but
I have to reopen the project and compile it for each other machine. I don't
know anything about MDAC. I am using access database. Is there any setings
that I have to change?

Thanks
Trupti


Quote:
> Are you installing the dll from a setup program?  And if so are you
> including the version of MDAC that runs on teh developement machine?  Also
> if your dll depends on a DSN that will need to be there.  And if you are
> using SQL7 you will need to run cliconfig on the client you are installing
> to.

> Other than that what are the errors you are getting?

> Regards,
> David



> > Is it a good Idea to create a dll in VB for the functions that interact
> with
> > Database?
> > I build a Dll for that and now everytime when I go to other machine,
other
> > than registering the DLL I get different automation error.
> > So I was just wondering that is my approach wrong?

> > Thanks
> > Trupti



Sat, 24 May 2003 03:00:00 GMT  
 Database and VB
Hi

You need to make sure that the GUID of the DLL does not change every
time you recompile. For this set the Compatibiltiy setting to Binary
Compatibility in the Project Properties tab.

Manoj



Quote:
> Is it a good Idea to create a dll in VB for the functions that
interact with
> Database?
> I build a Dll for that and now everytime when I go to other machine,
other
> than registering the DLL I get different automation error.
> So I was just wondering that is my approach wrong?

> Thanks
> Trupti

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 24 May 2003 03:00:00 GMT  
 Database and VB
MDAC = Microsoft Data Access Components.  Easiest way to check which version
you are using is to check the project references in VB.  although that will
only tell you the major version.  look for the version of ActiveX Data
Objects.  then look for a version mdac_typ.exe on your machine or network.
check the version of that one against what you saw in your vb project
propertie.  alternatively you could just download the latest version from
microsoft and install it on both machines.

Then look at your connection string if it says "DSN=<DSN name>"  you will
have to set up a dsn on the client machine.  check control panel 32bit odbc
you should be able to walk through that.

I would be willing to bet that it is either the version of ADO or you need
to set up a DSN(Data Source Name).

regards,
David


Quote:
> Well the way I did is open a Vb new project with Activex DLL. That's it.
> Then I wrote my code.
> Actually I am not a database person. Somebody else created a project
(.exe)
> and I had to use that code. So I thought each time taking his code and
doing
> cutting and pasting ( which is error prone ) let's make a Dll. I read a
bit
> ( Not thoroughly ) and created a dll. The dll worked fine on my machine
but
> I have to reopen the project and compile it for each other machine. I
don't
> know anything about MDAC. I am using access database. Is there any setings
> that I have to change?

> Thanks
> Trupti



> > Are you installing the dll from a setup program?  And if so are you
> > including the version of MDAC that runs on teh developement machine?
Also
> > if your dll depends on a DSN that will need to be there.  And if you are
> > using SQL7 you will need to run cliconfig on the client you are
installing
> > to.

> > Other than that what are the errors you are getting?

> > Regards,
> > David



> > > Is it a good Idea to create a dll in VB for the functions that
interact
> > with
> > > Database?
> > > I build a Dll for that and now everytime when I go to other machine,
> other
> > > than registering the DLL I get different automation error.
> > > So I was just wondering that is my approach wrong?

> > > Thanks
> > > Trupti



Sat, 24 May 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. database from VB for DOS to VB-Win

2. New to VB: Best Database for VB app?

3. Doubut on opening Access 97 Database in VB 5

4. Using Access 2000 Database on VB 6

5. ! How to protect Ms Access database use VB program

6. How to Compact and Repair database from VB.

7. Open MS Access database from VB .exe file (Shell)

8. Creating new Access 97 database by VB code in Access 2000 module

9. Close current database using VB code?

10. Is there a way to compact a database in VB Code

11. Sorting a Database From VB

12. linking an excel spreadsheet to an access database using vb

 

 
Powered by phpBB® Forum Software