Newsgroup: it.comp.lang.delphi
Titolo: Problema con Ado Componet in Delphi e Ms Sql Server!!!

Salve, sto realizando una piccola applicazione che usa Ms Sql Server, ed uso
i seguenti componenti:
_ADOConnection
_ADO DataSet
_DataSetProvider
_ClientDataSet.
Ho eseguito le operazioni riportate nell'help che trascrivo qui sotto:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Building a VCL Forms ADO Database Application The following procedure
describes how to build an ADO database application. Building a VCL ADO
application consists of the following major steps:
  1.. Set up the database connection.
  2.. Set up the dataset.
  3.. Set up the data provider, client dataset, and data source.
  4.. Connect a DataGrid to the connection components.
  5.. Run the application.
To add an ADO connection component
  1.. Choose FileNewOtherDelphi Projects or C++Builder Projects and
double-click the VCL Forms Application icon.
  The VCL Forms Designer is displayed.
  2.. From the ADO page of the Tool Palette, place an ADOConnection
component on the form.
  3.. Double-click the ADOConnection component to display the
ConnectionString dialog.
  4.. If necessary, select Use Connection String; then click the Build
button to display the Link Properties dialog.
  5.. On the Provider page of the dialog, select Microsoft Jet 4.0 OLE DB
Provider; then click the Next button to display the Connections page.
  6.. On the Connections page, click the ellipsis button to browse for the
dbdemos.mdb database. The default path to this database is C:\Program
Files\Common Files\Borland Shared\Data.
  7.. Click Test Connection to confirm the connection. A dialog appears,
indicating the status of the connection.
  8.. Click OK to close the Data Link Properties dialog. Click OK to close
the ConnectionString dialog.
To set up the dataset
  1.. From the ADO page, place an ADODataSet component at the top of the
form.
  2.. In the Object Inspector, select the Connection property drop-down
list. Set it to ADOConnection1.
  3.. Set the CommandText property to an SQL command, for example, Select *
from orders.
  You can either type the Select statement in the Object Inspector or click
the ellipsis to the right of CommandText to display the CommandText Editor
where you can build your own query statement. Tip:
       If you need additional help while using the CommandText Editor, click
the Help button.
  4.. Set the Active property to True to open the dataset.
  You are prompted to log in. Use admin for the username and no password.
To add the provider
  1.. From the Data Access page, place a DataSetProvider component at the
top of the form.
  2.. In the Object Inspector, select the DataSet property drop-down list.
Set it to ADODataSet1.
To add client dataset
  1.. From the Data Access page, place a ClientDataSet component to the
right of the DataSetProvider component on the form.
  2.. In the Object Inspector, select the ProviderName drop-down. Set it to
DataSetProvider1.
  3.. Set the Active property to True to allow data to be passed to your
application.
  A data source connects the client dataset with data-aware controls. Each
data-aware control must be associated with a data source component to have
data to display and manipulate. Similarly, all datasets must be associated
with a data source component for their data to be displayed and manipulated
in data-aware controls on the form.
To add the data source
  1.. In the Tool Palette on the Data Access page, place a DataSource
component to the right of the ClientDataSet on the form.
  2.. In the Object Inspector, select the DataSet property drop-down. Set it
to ClientDataSet1.
To connect a DataGrid to the DataSet
  1.. In the Tool Palette on the Data Controls page, place a DBGrid
component on the form.
  2.. In the Object Inspector, select the DataSource property drop-down. Set
the data source to DataSource1.
  3.. Choose RunRun.
  4.. You are prompted to log in. Enter admin for the username and no
password.
  The application compiles and displays a VCL form with a DBGrid.
  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Il problema e' che arrivati al punto 3 che riporto  qui di seguito:
  Set the Active property to True to allow data to be passed to your
application
  mi viene visualizzato un messaggio di errore che riporto qui di seguto:
  ADODataSet1: Misssing Commandtext Property!!
  Sono andato a vedere la seguente proprieta' CommandText di ADODataSet1 e
si apre l'editor 'Command Text Editor' che non mi visualizza nessuna
tablella e nessun campo.
  Come devo fare per visualizzare le tabelle del database selezionato
nell'editor?
  Grazie per chi voglia rispondermi!!!

 tablella e nessun campo. [...]
Sei sicuro che la connessione vada a buon fine?
Hai provato ad impostare prima /Connected/ a True sul componente 
*ADOConnection* oppure a verificare la bontà delle impostazioni per 
accedere al database premendo "Verify Connection" dalla finestra di dialogo?
Ciao,
   Marco.
-- 
MARCO BREVEGLIERI
  (
http://www.marco.breveglieri.name
)


Hai assegnato alla proprietą Connection della tua TAdoDataset la
TAdoConnection?
AdoDataset1.Connection := AdoConnection1
-- 
Ore 18.30: premo invio.

 ha scritto nel messaggio 
news:43ba9ef2$1...@newsgate.x-privat.org...

Salve, si ho provato ad impostare Connected a True su componente 
*ADOConnection*
e ho verificato anche la bonta' della connessione e tutto va a buon fine, 
non riesco a capire perche non mi visualizza le tabelle e i campi nelle 
'editor!!!
Aspetto informazioni!!! 

 ha scritto nel messaggio 
news:kaC6Q9R1GvDNh8HSCT=Mpfu...@4ax.com...

Si ho impostato anche queste proprieta' ma nulla!!! 

  ADODataSet1: Misssing Commandtext Property!!
forse non e' qui il problema , ma hai provato ad inserire su CommandText
una stringa del tipo Select * from <nome tabella del db>