Set the conn=New ADODB. Connection
Set the rs=New ADODB. You
The Set mstream=New ADODB. Stream
Conn. Open Connstring
Rs. Open the "select * from ver", conn, adOpenKeyset, adLockOptimistic
CommonDialog1. Filter="* *"
CommonDialog1. ShowOpen
Text7. Text=CommonDialog1. FileTitle
Set mstream=New ADODB. Stream -- -- go wrong here, but on the other computer tried normal
With mstream
. Type=adTypeBinary
. Open
The LoadFromFile CommonDialog1. FileName
End With
If the rs. RecordCount=0 Then
Rs. AddNew
Rs. Fields (1)=1 #
Rs. Update
End the If
Rs. Fields (0)=mstream. Read
Rs. Fields. (1)=CommonDialog1 FileTitle
Rs. Update
Mstream. Close
End Sub
Running on other computers, but run on a computer appear this error, error statements: Set mstream=New ADODB, Stream, tried many ways still unsolved, please expert help, in this very grateful
CodePudding user response:
Which is referenced ADO version? Change the version?Late or try to create
The Set mstream=CreateObject (" ADODB. Stream ")
CodePudding user response:
Version 2.5, the above methods and tried the same result, I on the other computer package also tried not solveCodePudding user response:
Before your error "statement", it is not a New ADODB library. The Stream, the sentence not wrong?Since the "front" is successful, what are you doing "behind" but also to New again? With not directly!
CodePudding user response:
Private Sub Command6_Click ()Dim conn As New ADODB. Connection
Dim the rs As New ADODB. You
Dim STM As New ADODB. Stream
'Set the conn=New ADODB. Connection
'Set the rs=New ADODB. You
'Set mstream=New ADODB. Stream
Conn. Open Connstring
Rs. Open the "select * from ver", conn, adOpenKeyset, adLockOptimistic
CommonDialog1. Filter="* *"
CommonDialog1. ShowOpen
Text7. Text=CommonDialog1. FileTitle
'Set STM=New ADODB. Stream
'Set STM=CreateObject (" ADODB. Stream ")
With STM -- -- -- -- -- - according to the method in this place appear the same error message!
. Type=adTypeBinary
. Open
The LoadFromFile CommonDialog1. FileName
End With
If the rs. RecordCount=0 Then
Rs. AddNew
Rs. Fields (1)=1 #
Rs. Update
End the If
Rs. Fields (0)=mstream. Read
Rs. Fields. (1)=CommonDialog1 FileTitle
Rs. Update
Mstream. Close
End Sub
The first is:
Dim conn As ADODB. Connection
Dim the rs As the ADODB library you
Dim STM As the ADODB library Stream
Set the conn=New ADODB. Connection
Set the rs=New ADODB. You
The Set mstream=New ADODB. Stream
Can use the method of basic all tried is not, the only thing I have to use is to use 360 has killed a poison, I think the problem should be out of here,
CodePudding user response:
That you try the number after the rogue, execute your code again,