|
-
Aug 24th, 2005, 09:34 PM
#1
Thread Starter
Hyperactive Member
[Solved]Error429:ActiveX component can't create object when try to use ADODB.Stream
Solution:
Check for MDAC installation. In my case, computer that got the problem have no MDAC install yet. My Application work fine after MDAC installation.
I got some error as "429 : ActiveX component can't create object." when I try to use ADODB.Stream in form of myStream.Type = adTypeBinary. (Please see on VBCode that show below).
I have test my application on many computer but only one computer that use Windows98SE got this error.
What is a problem? and What should I do for solve this problem?
VB Code:
Private Sub cmdView_Click()
On Error GoTo Resume_Error
Dim myStream As New ADODB.Stream
Dim cn As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
Dim s As String
cn.Open modMain.ConnectionString
s = "SELECT RFile, RName FROM Registers WHERE RefNo = '" & ReferenceNumber & "'"
rs1.CursorLocation = adUseClient
rs1.Open s, cn, adOpenDynamic, adLockOptimistic
If rs1!RName <> "" Then
myStream.Type = adTypeBinary '<< Error message when it try to do this line.
End If
rs1.Close
Exit Sub
Resume_Error:
MsgBox Err.Number & " : " & Err.Description, vbCritical, "Resume Error"
End Sub
Last edited by solar115; Aug 25th, 2005 at 03:33 AM.
^solaris^
-
Aug 24th, 2005, 10:56 PM
#2
Re: Error 429 : ActiveX component can't create object when try to use ADODB.Stream
Try this...
VB Code:
Private Sub cmdView_Click()
On Error GoTo Resume_Error
Dim myStream As ADODB.Stream
Dim cn As ADODB.Connection
Dim rs1 As ADODB.Recordset
Set myStream = New ADODB.Stream
Set cn = New ADODB.Connection
Set rs1 = New ADODB.Recordset
Dim s As String
cn.Open modMain.ConnectionString
s = "SELECT RFile, RName FROM Registers WHERE RefNo = '" & ReferenceNumber & "'"
rs1.CursorLocation = adUseClient
rs1.Open s, cn, adOpenDynamic, adLockOptimistic
If rs1!RName <> "" Then
myStream.Type = adTypeBinary '<< Error message when it try to do this line.
End If
rs1.Close
Exit Sub
Resume_Error:
MsgBox Err.Number & " : " & Err.Description, vbCritical, "Resume Error"
End Sub
-
Aug 24th, 2005, 11:28 PM
#3
Thread Starter
Hyperactive Member
Re: Error 429 : ActiveX component can't create object when try to use ADODB.Stream
dee-u,
I try as your suggestion and I waiting for some reply from other site that got this problem.
-
Aug 24th, 2005, 11:54 PM
#4
Re: Error 429 : ActiveX component can't create object when try to use ADODB.Stream
 Originally Posted by solar115
dee-u,
I try as your suggestion and I waiting for some reply from other site that got this problem.
What other site? I thought it was your problem.
-
Aug 24th, 2005, 11:59 PM
#5
Thread Starter
Hyperactive Member
Re: Error 429 : ActiveX component can't create object when try to use ADODB.Stream
dee-u,
Yes,It my problem.
But I cannot test my app on many platform with only on my own computer. So that why I sent it to other site for test.
-
Aug 25th, 2005, 03:33 AM
#6
Thread Starter
Hyperactive Member
Re: [Solved]Error429:ActiveX component can't create object when try to use ADODB.Stream
Solution:
Check for MDAC installation. In my case, computer that got the problem have no MDAC install yet. My Application work fine after MDAC installation.
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
|