|
-
May 5th, 2002, 10:19 PM
#1
Thread Starter
Addicted Member
Help with this error!!!
OK, I'm getting the following error on SQL Server connection in Win98 (referencing ADO 2.5). I DONT get the error in WinXP. I dont know why this is happening:
Error 430: Class does not support Automation or does not support expected interface.
VB Code:
Private Sub ConnectDB(ByRef rID3Title, rID3Artist)
768 On Error GoTo DB_err
'DB Connect setting up
Dim SQLstatement As String
771 SQLCON.ConnectionTimeout = 5 ' Time out for the connection
772 SQLCON.Provider = "sqloledb" ' OLEDB Provider
773 SQLCON.Properties("Network Address").Value = "64.105.xx.xxx,80" ' set the ip address of your sql server
774 SQLCON.CommandTimeout = 10 ' set timeout for 3 minutes
775 SQLCON.Properties("Network Library").Value = "dbmssocn" ' set the network library to use win32 winsock tcp/ip
776 SQLCON.Properties("Data Source").Value = "SERVER"
777 SQLCON.Properties("Initial Catalog").Value = "Database"
778 SQLCON.CursorLocation = adUseServer ' For ADO cursor location
'SQLCON.Properties("Integrated Security").Value = "SSPI"
779 SQLCON.Properties("User ID").Value = "xxxxxx"
780 SQLCON.Properties("Password").Value = "xxxxxx"
781 SQLCON.Open
'Setup done
782 SQLstatement = "SELECT dbo.Cover.Album, dbo.Cover.Cover, dbo.Artist.URL " _
& "FROM dbo.Artist INNER JOIN " _
& "dbo.Cover ON dbo.Artist.Artist = dbo.Cover.Artist INNER JOIN " _
& "dbo.Track ON dbo.Cover.Album = dbo.Track.Album " _
& "WHERE (dbo.Track.Track = N'" & Replace(rID3Title, "'", "") & "') AND " _
& "(dbo.Artist.Artist = N'" & Replace(rID3Artist, "'", "") & " ')"
783 RS.Open SQLstatement, SQLCON
784 Exit Sub
DB_err:
792 RS.Close
793 SQLCON.Close
794 Set RS = Nothing
795 Set SQLCON = Nothing
End Sub
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
-
May 5th, 2002, 10:24 PM
#2
That usually happens when the project references get screwed up, or if you break compatibility on a project. But unless this is a usercontrol, or a DLL, then you probably don't need to worry about compatibility. Check to see that the 98 machine has the correct version of ADO, or whatever SQLCON is.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
May 5th, 2002, 10:26 PM
#3
Thread Starter
Addicted Member
Yea, it is an ActiveX DLL that I am making. I just found out that ADO 2.1 comes on Windows98SE. Does anyone know what version First Edition comes with???
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
-
May 5th, 2002, 10:49 PM
#4
PowerPoster
If not 2.1, then probably 2.0.
They are compatible enough though - shouldn't be a problem.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
May 5th, 2002, 10:52 PM
#5
Thread Starter
Addicted Member
VB6 is telling me to install MDAC 2.5 when I have ADO 2.1 as a reference. Unfortuately, its a 10 meg install and I cant have it that big! Is there an alternative to this? How can I connect to my SQL Server using older ADO versions without a huge install.
Ethan
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
-
May 5th, 2002, 11:02 PM
#6
PowerPoster
Once you've installed 2.5 on your dev. machine, I don't think you need the whole 10M thing to distribute your code. I could be wrong though...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|