LOCAL loCurPedidos as CursorAdapter CLOSE TABLES CLOSE DATABASES all loCurPedidos = CREATEOBJECT("CAPedidos") BROWSE FONT "Verdana", 14 loCurPedidos = null *-- *-- CAPedidos *-- DEFINE CLASS CAPedidos as CursorAdapter HIDDEN StrConexao && String de conexão ODBC StrConexao = "Driver={SQL Server}; " + ; "Server=(local); " + ; "Database=Northwind; " + ; "UID=sa; PWD=;" PROCEDURE Init WITH This .SendUpdates = .T. .DataSourceType = "ODBC" .DataSource = SQLSTRINGCONNECT(.StrConexao) .Alias = "Pedidos" .SelectCmd = "Select OrderID, CustomerID, OrderDate " + ; "from Orders" .CursorSchema = "OrderID I, CustomerID C(10), OrderDate D" .CursorFill(.T.) ENDWITH ENDPROC ENDDEFINEUma abraço!