Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Component Can't Create Object

Status
Not open for further replies.

ryansdv

Programmer
May 19, 2003
42
0
0
PH
hi everyone,

i've already check so many references like " but still i have not solve this problem.

it works with windows xp but doesn't work with windows 98.

Dim oConn As ADODB.Connection

Set oConn = New ADODB.Connection

activex component can't create object on set oconn = new adodb.connection.

as for adodb ref its "msado27.tlb" and im certain that the file is existing in c:\program files\common files\system\ado\

i don't understand what is lucking with this program.

please help!
 
Dim oConn as New ADODB.Connection
oConn.Open <connection string>,uid,pwd,options

You don't need to use the Set command.

Here's a snippet. It's nonsense code, but illustrates what you need to do. Connects Access to an Oracle database (It's from my Win98 machine)

Private Sub CreateCon()
Dim strConnect As String
Dim strsql As String
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
strConnect = "Provider=MSDAORA.1;Password=PAULM;User ID=PAULM;Data Source=KARSPROD;Persist Security Info=True"
con.Open strConnect
strsql = "Select count(*) as thecount from accident_summary"
con.Execute strsql
rs.Open strsql
End Sub

Tranman

"Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant." Mark Twain
 
thank you tranman for your time.

i tried your sample but still doesn't work.

Dim oConn As New ADODB.Connection
Dim cdiCon As String

cdiCon = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=;Initial Catalog=cdiSeiko;Data Source=CDINETSERVER"

oConn.Open cdiCon
oConn.Close

ActiveX Component Can't Object now on "oConn.Open cdiCon"


Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top