![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
|||
|
|||
|
Veamos, hay algo que no entiendo, estas usando un bookmark de otra consulta para usarlo en una diferente????
Código:
SQLQuery1->SQL->Clear();
SQLQuery1->SQL->Add("show tables");
SQLQuery1->Open();
TBookmarkStr BM= SQLQuery1->Bookmark; //????????????
SQLQuery1->First();
while((!SQLQuery1->Eof)&&((SQLQuery1->FieldByName("Database")->AsString)!="sircdb"))
SQLQuery1->Next();
SQLQuery1->Refresh();
ClientDataSet1->UpdateCursorPos(); //?????????????
SQLQuery1->Bookmark=BM; //????????????
SQLQuery1->Close();
SQLQuery1->SQL->Clear();
SQLQuery1->SQL->Add("use basededatos;");
SQLQuery1->Open(); //el error sale en esta linea
Salud OS
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney |
|
#2
|
||||
|
||||
|
egostar, lo de los bookmarks es un intento desesperado, en realidad no deberia ir ningun bookmark
consegui un ejemplo en su idioma Código:
procedure TFormTryMySQL.ConnectButtonClick(Sender: TObject);
begin
// Prüfen, ob wir eine aktive Verbindung haben. Falls ja, schliessen wir sie.
if MySQLConnection1.Connected then CloseConnection(Sender);
// Die Verbindungsparameter setzen.
MySQLConnection1.HostName := HostEdit.Text;
MySQLConnection1.UserName := UserEdit.Text;
MySQLConnection1.Password := PasswdEdit.Text;
MySQLConnection1.DatabaseName := 'mysql'; // MySQL ist immer vorhanden!
ShowString('Opening a connection to server: ' + HostEdit.Text);
MySQLConnection1.Open;
// Zuerst eine Liste der verfügbaren Datenbanken abfragen.
if MySQLConnection1.Connected then begin
ShowString('Connected to server: ' + HostEdit.Text);
ShowString('Retrieving list of available databases.');
SQLQuery1.SQL.Text := 'show databases';
SQLQuery1.Open;
while not SQLQuery1.EOF do begin
DatabaseComboBox.Items.Add(SQLQuery1.Fields[0].AsString);
SQLQuery1.Next;
end;
SQLQuery1.Close;
ShowString('List of databases received!');
end;
end;
fuente -> aqui |
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Error Creating cursor handle | jose_205711 | Conexión con bases de datos | 3 | 06-11-2010 10:04:02 |
| Error creating cursor handle | miguel_fr | SQL | 6 | 02-01-2007 12:47:09 |
| Error: puntero no regresa de la consulta o Cursor not Returned from query | The_figo | MySQL | 0 | 23-11-2006 20:08:55 |
| error "Subquery returned more than 1 value" | lynu | SQL | 1 | 14-08-2006 16:16:25 |
| ¿Por qué me da este error?Error creating cursor manejador | nuri | SQL | 2 | 01-08-2005 17:30:28 |
|