Home > Software engineering >  Vb SQL could not find stored procedure and the method of object Refresh IAdodc failure
Vb SQL could not find stored procedure and the method of object Refresh IAdodc failure

Time:09-18

Is vb, SQL server, want to adodc in MSHFlexGrid display, but running an error prompt SQL could not find stored procedure and the method of object Refresh IAdodc failure T_T , small white bosses don't know what to do - o help
Private Sub searchCmd_Click ()
Ado. RecordSource="select * from the product where '" & amp; Condition. The Text & amp; "'"="" & amp; KeywordText. Text & amp; "'
"Ado. Refresh
End Sub

CodePudding user response:

Debugging when move the mouse to Ado. RecordSource above. It shows the Ado RecordSource="false", is the query statement is wrong?

CodePudding user response:

Ado. You="select * from the product where" & amp; Condition. The Text & amp; ""=" '" & amp; KeywordText. Text & amp; "'"

CodePudding user response:


Private Sub searchCmd_Click ()
Ado. You="select * from the product where" & amp; Condition. The Text & amp; ""=" '" & amp; KeywordText. Text & amp; "'
"Ado. Refresh
End Sub

Run out of the window error: compile error: attribute is invalid use

CodePudding user response:

All commented On the Error Resume Next statement, in VB6 IDE,
The error and then click the debugging, the cursor will stop error in the statement,
Or
In doubt may have a logical error statements in advance to set breakpoints, run through the breakpoint interrupt,

At this point can be used in the immediate window
? The variable name
Or
? The function name () function parameter
Or
Process (parameters)
Auxiliary debugging,

CodePudding user response:

 Ado. You="select * from the product where" & amp; Condition. The Text & amp; "='" & amp; KeywordText. Text & amp; "'" 
  • Related