Re: Data Provider Could Not Be Initialized
- From: "Alan Z. Scharf" <ascharf@xxxxxxxxxxxxxx>
- Date: Thu, 1 Mar 2007 01:31:50 -0500
Sylvain,
Once again, thanks for your help.
I don't think I would have ever seen that.
It works fine now.
Regards,
Alan
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OSHyPX4WHHA.388@xxxxxxxxxxxxxxxxxxxxxxx
You have wrote SPPI instead of SSPI for the "Integrated Security"
property.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Alan Z. Scharf" <ascharf@xxxxxxxxxxxxxx> wrote in message
news:%23utFe83WHHA.1180@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm trying to set up a separate ADO connection for a form's recordset.
I've used the example in KB /281998, but am getting above error message
at the point of the .Open method.
Can anyone spot what I am doing wrong?
Note: The application first opens with the following connection: It is
the separate ADO connection for a form that I'm having trouble with, even
though I used the same connection values as in conncet string below.
:Provider=Microsoft.Access.OLEDB.10.0;Persist Security Info=True;Data
Source=GRAPEVINE2;Integrated Security=SSPI;Initial Catalog=Marketing;Data
Provider=SQLOLEDB.1
Thanks.
Alan
Code for separate Form connection in OnOpen event
------------------------------------------------------
Private Sub Form_Open(Cancel As Integer)
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
'Create a new ADO Connection object
Set cnn = New ADODB.Connection
'Use the Access 10 and SQL Server OLEDB providerst to
'open the Connection
With cnn
.Provider = "Microsoft.Access.OLEDB.10.0"
.Properties("Data Provider").Value = "SQLOLEDB"
.Properties("Data Source").Value = "GRAPEVINE2"
.Properties("Persist Security Info").Value = "True"
.Properties("Integrated Security").Value = "SPPI"
.Properties("Initial Catalog").Value = "Marketing"
.Open
End With
'Create an instance of the ADO Recordset class, and
'set its properties
Set rst = New ADODB.Recordset
With rst
Set .ActiveConnection = cnn
.Source = ("SELECT * FROM dbo.tblCalculationResults")
' .LockType = adLockOptimistic
' .CurstorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
Set Me.Recordset = rst
Set rst = Nothing
Set cnn = Nothing
End Sub
.
- Prev by Date: Re: using mirroring of sql2005 +adp
- Next by Date: Re: Referencing combo box column
- Previous by thread: Re: using mirroring of sql2005 +adp
- Next by thread: Re: Referencing combo box column
- Index(es):
Relevant Pages
|