Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter Bug Repro Code...
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00762796
Message ID:
00762853
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Hi Mark,

That's what Sql Profiler shows.
exec sp_executesql N'SELECT * FROM Customers WHERE CustomerID LIKE @P1 ORDER BY CompanyName', 
  N'@P1 nchar(5)', N'M%   '
As you can see there're extra spaces in the value of the parameter. I think it's a bug in CA. A workaround may be to use "_" to pad to the lenght of the field.
cCustomerId = [M____]
>...or maybe not a bug, but it is darned puzzling. The database is Northwind in MSDE/SQL Server. The DataSourceType is ADO. The code runs 2 slightly different SelectCMD properties. One returns data the other does not. Yet why one does not is totally baffling. The 2 select SQL are:
>SELECT * FROM Customers WHERE CustomerID LIKE ?cCustomerID ;
>   ORDER BY CompanyName
>SELECT * FROM Customers WHERE CompanyName LIKE ?cCompany ;
>   ORDER BY CompanyName
>The first one returns no data. If you create an ODBC connection to the same database and use SPT, the first SQL does return data. The following code will reproduce these results. You may need to modify the ADO Connection String to connect to your Northwind database in MSDE or SQL Server.
>
>The property lSelectID controls which SelectCmd is used and the order of use of the SelectCmd SQL does not matter. lSelectID can be first .T. then .F. or it can be .F. then .T. You get the same results either way.
>
< snip >
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform