#Include adovfp.h oConnection = CreateObject("adodb.connection") oRS = CreateObject("adodb.recordset") With oConnection .ConnectionString = "dsn=my_dsn_to_my_vfp_database;uid=;pwd=;" .Open EndWith oCommand = CreateObject("ADODB.Command") With oCommand .ActiveConnection = oConnection .CommandType = adCmdTable .CommandText = "my_view" parParam = .CreateParameter("my_parameter_name_in_my_view", adInteger, adParamInput, 4, 1) .Parameters.Append(parParam) EndWith <b>oRS = cmdCommand.Execute</b> With oRS Do While !oRS.EOF ? oRS.Fields("field_name_1").Value, oRS.Fields("field_name_2").Value oRS.MoveNext EndDo EndWith oRS.Close oConnection.CloseWhen Execute command is executed, the VFP ODBC driver fire an error saying that "my_parameter_name_in_my_view" column is not found.
Create View my_view As ; Select my_table.field_name_1, my_table.field_name_2 ; From my_table ; Where my_table.field_name_n = ?my_parameter_name_in_my_viewWhat am I doing bad?