Information générale
Titre:
Bind CursorAdapter to a grid problem
Versions des environnements
Network:
Windows 2000 Server
I have a form with:
bindcontrols = .f.
buffermode = 2
datasession = 2
and also with a 3 columns grid and a button on the form.
In button click method:
local loCursor as CursorAdapter
loCursor = newobject("Cursoradapter")
lcConnString = 'driver=SQL Server;server=(local);database=Northwind;trusted_connection=yes'
with loCursor
.Alias = 'Customers'
.DataSourceType = 'ODBC'
.DataSource = sqlstringconnect(lcConnString,.t.)
text to .SelectCmd noshow
select CustomerID, CompanyName, ContactName from Customers
endtext
.KeyFieldList = 'CustomerID'
.Tables = 'Customers'
.UpdatableFieldList = 'CustomerID, CompanyName, ContactName'
.UpdateNameList = 'CUSTOMERID CUSTOMERS.CUSTOMERID,COMPANYNAME CUSTOMERS.COMPANYNAME, CONTACTNAME CUSTOMERS.CONTACTNAME'
.CursorFill()
endwith
thisform.BindControls = .t.
thisform.grdCustomers.RecordSource = "Customers"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
when I click button, the grid just shows a blank area not show the result correctly.
What can i do about it ?
Thanks
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement