Hi,

I want to connect it with my harbour PRG.
The compilation is OK, but at the execution it shows the following message:
 Error ADODB.Connection/0  S_OK: OPEN (in the red alert window).
Why?

the answer is a little "out of topic", since I do not solve you ADODB problem, but propose another solution. The following code compiled with rddsql and sddmy libraries:
-----------------------------------------
#define RDDI_CONNECT          1001

REQUEST SDDMY
ANNOUNCE RDDSYS

PROC main()
LOCAL nI
  RDDSETDEFAULT("SQLBASE")
? "Connect:", RDDINFO(RDDI_CONNECT, {"MYSQL", "db4free.net", "gio22", "marcella", "giovanni"})
  DBUSEAREA(.T.,, "select * from clienti", "clienti")
  ? "Structure:", HB_VALTOEXP(DBSTRUCT())
  DO WHILE !EOF()
    ? ""
    FOR nI := 1 TO FCOUNT()
      ?? FIELDGET(nI), " "
    NEXT
    DBSKIP()
  ENDDO
  DBCLOSEALL()
RETURN
-----------------------------------------

prints:
-----------------------------------------
Connect:          1
Structure: {{"COGNOME", "C", 20, 0}, {"NOME", "C", 20, 0}, {"ETA", "N", 3, 0}}
rossi  mario   44
verdi  luigi   33
neri  carmelo   88
-----------------------------------------


Regards,
Mindaugas

P.S. you can also use BROWSE() instead of DO WHILE loop. I've used DO WHILE to be able copy-paste results of application. Notice: editing of table requires to generate SQL queries explicitly.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to