|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Error trying to connect to Access DB in VB.NetI am writing a VB.NEt application in Visual Studio 2005 that will
automate an Access database. When I try the following Dim oAccess as Access.Application I get this error: "Type 'Access.Application' is not defined". I don't know if I am missing a reference or not. Could someone please show me the correct way. I already have the following references in my app: Microsoft Access 11.0 Obj Library Microsoft ActiveX Data Objects 2.5 Library Microsoft DAO 3.6 Obj Library Microsoft Office 11.0 Object Library Microsoft Visual Basic for Applications Extensibility 5.3 Thanks Unfortunately I could not replicate this error. Does the error occur
when you build or during runtime? If it builds have you tried stepping through the code to pinpoint the problem line? Any extra info might help find the problem. Also, to create an intance of the Access.Application you need to throw in the "New" keyword. i.e. Dim oAccess as New Access.Application. Also, what exactly are you trying to automate? You may not even need to create the Access.Application object. Thanks, Seth Christie wrote: Show quoteHide quote > I am writing a VB.NEt application in Visual Studio 2005 that will > automate an Access database. When I try the following > > Dim oAccess as Access.Application > > I get this error: "Type 'Access.Application' is not defined". > > I don't know if I am missing a reference or not. Could someone please > show me the correct way. > > I already have the following references in my app: > Microsoft Access 11.0 Obj Library > Microsoft ActiveX Data Objects 2.5 Library > Microsoft DAO 3.6 Obj Library > Microsoft Office 11.0 Object Library > Microsoft Visual Basic for Applications Extensibility 5.3 > > Thanks Seth..thanks you are right..I did not need to create the
Access.Application object..used an ADODB connectin instead... rowe_newsgroups wrote: Show quoteHide quote > Unfortunately I could not replicate this error. Does the error occur > when you build or during runtime? If it builds have you tried stepping > through the code to pinpoint the problem line? Any extra info might > help find the problem. Also, to create an intance of the > Access.Application you need to throw in the "New" keyword. i.e. Dim > oAccess as New Access.Application. Also, what exactly are you trying to > automate? You may not even need to create the Access.Application > object. > > Thanks, > > Seth > > Christie wrote: > > I am writing a VB.NEt application in Visual Studio 2005 that will > > automate an Access database. When I try the following > > > > Dim oAccess as Access.Application > > > > I get this error: "Type 'Access.Application' is not defined". > > > > I don't know if I am missing a reference or not. Could someone please > > show me the correct way. > > > > I already have the following references in my app: > > Microsoft Access 11.0 Obj Library > > Microsoft ActiveX Data Objects 2.5 Library > > Microsoft DAO 3.6 Obj Library > > Microsoft Office 11.0 Object Library > > Microsoft Visual Basic for Applications Extensibility 5.3 > > > > Thanks
C# vs. VB.NET: typing speed
Arraylist Problem Collection Sort Inherited Forms in VB.NET class code does not show 'inherits from...' Configuration in published program Mnemonics for Buttons with symbols on Determining if MS Word is running through VB code VB.net 1.0 to VB.net Express Edition Procedures/Functions insert a spreadsheet control at design time |
|||||||||||||||||||||||