|
-
Jul 13th, 2015, 02:39 AM
#1
Thread Starter
Junior Member
Method refresh of IAdodc failed
In fixing a VB application, the previous programmer in some instances used a SSOLEDBGRID to populate table data and the variable used to populate the grid was ADODC.
The ADODC variable has the following properties:
Connection String: Provider=SQLNCLI11.1;Integrated Security=SSPI;Persist Security Info=False;User ID="";Initial Catalog=[Database Name];Data Source=[Server];Initial File Name="";Server SPN=""
[I also tried "Provider=MSDASQL.1;Persist Security Info=False;Data Source=Reliant"]
RecordSource is: "SELECT * FROM Configure"; the query has a command type of "adCommandUnknown"
The error displayed on the screen occurs at ResultDC.Refresh when the View Results command button is clicked:
-- I abort the program at this time.
When I inspect the properties if the GRID - the following errors are displayed:
-- after I click on "OK" the following appears:
"Warning - the datasource property has not been set and/or the data control has not been configured correctly"
The code behind the command button reads:
Dim res As Boolean
On Error GoTo cmdPerform_Click_Error
res = C1Query.BuildSQL
If res Then
ResultDC.CommandType = adCmdText
ResultDC.RecordSource = C1Query.SQL
ResultDC.Refresh
End If
Any suggestions to fix this problem would be appreciated. Let me know if I need to provide additional information.
Last edited by DebbieH; Jul 13th, 2015 at 12:30 PM.
Reason: Please move this post to VB 6 or earlier forum
Tags for this Thread
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
|