This is a migrated thread and some comments may be shown as answers.

SQLDataSource and Acces 2003 parametrized queries

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeannot Diderrich
Top achievements
Rank 1
Jeannot Diderrich asked on 24 Apr 2010, 09:14 PM
Hello,

I try to connect with a SqlDatSource to a Acces 2003 query with parameters. I get the following error message

Retrieving procedure parameter information is not supported by the 'Microsoft.Jet.Oledb4.0' provider

Does the SqlDataSource not support Acces queries?

Here's the code

Dim report1 As New ReportName()
        report1.ReportParameters.Add("NumeroPersonne", ReportParameterType.Integer, 4)
        Dim sqlDataSource2 As New SqlDataSource()
        sqlDataSource2.ProviderName = "System.Data.OleDb"
        sqlDataSource2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Erisk\RiskAssessment\data\RiskAssessment.mdb"
        sqlDataSource2.SelectCommand = "std_KYC_BO_NoParam"
        sqlDataSource2.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
        sqlDataSource2.Parameters.Add("@NumeroPersonne", DbType.Int32, "=Parameters.NumeroPersonne")
        report1.DataSource = sqlDataSource2
        rvClients.Report = report1
        rvClients.RefreshReport()


1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 Apr 2010, 05:25 PM
Hello Jeannot Diderrich,

You can connect to a Microsoft Access database using the Telerik SqlDataSource.

Unfortunately we don't support parametrized Access Queries (stored procedures) because the provider can't retrieve the procedures' parameter information. Currently we recommend using of text queries to retrieve data from Access.

Have in mind when you are working with an OLE DB database, parameters in a parametrized statement are not named and instead are specified with the placeholder character '?'.

Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Jeannot Diderrich
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or