Page 1 of 2

Error SQLBASE/1901 Not connected

Posted: Thu May 04, 2017 12:05 pm
by AidTIC
Estoy teniendo problemas para conectar con fichero access con la versión 3.4.4.
Si compilo con la version 3.4.3 me funciona, si lo hago con la 3.4.4 me da el "Error SQLBASE/1901 Not connected"

Que puede se??

Code: Select all

#include <hmg.ch>
#include "common.ch"

#include <minigui.ch>
#include <dbstruct.ch>

REQUEST SDDODBC, SQLMIX
REQUEST DBFCDX , DBFFPT
	

#define RDDI_CONNECT          1001
#define RDDI_DISCONNECT       1002
 LOCDBS := "Z:\\Skydone\SkydoneData.mdb"
 PUBLIC aFichAcc := "DBQ="  + ALLTRIM ( LOCDBS ) + ";Driver={Microsoft Access Driver (*.mdb)}"
 
...
RDDSETDEFAULT( "SQLMIX" )
	RDDINFO ( RDDI_CONNECT, { "ODBC", aFichAcc } )
	
    DBUSEAREA( .T.,, "select * from TransactionPropDetails", "aTrans" )
	INDEX ON FIELD->ItemID+PropertyValue1_Key2 TO iTrans


Re: Error SQLBASE/1901 Not connected

Posted: Thu May 04, 2017 12:39 pm
by serge_girard
Wrong or missing password perhaps?

Serge

Re: Error SQLBASE/1901 Not connected

Posted: Thu May 04, 2017 2:46 pm
by AidTIC
No necesita contraseña, y es raro que compilando con 3.4.3 funcione , y con la 3.4.4 no

Re: Error SQLBASE/1901 Not connected

Posted: Fri May 05, 2017 8:03 am
by Anand
Hi AidTIC,
AidTIC wrote:
Thu May 04, 2017 2:46 pm
No necesita contraseña, y es raro que compilando con 3.4.3 funcione , y con la 3.4.4 no

It does not need a password, and it is rare that compiling with 3.4.3 works, and with 3.4.4 no
I once had a similar problem, not in HMG, i.e. a sql database which was working in my old program did not open in my new program. The sql similarly did not had any password. I solved by adding a password to it and giving the password in the connection string.

I presume that some how "password" has become must for connection. You can try it.

Regards,

Anand

Re: Error SQLBASE/1901 Not connected

Posted: Fri May 05, 2017 10:21 am
by AidTIC
El problema es que esa base de datos, no le puedo poner contraseña, pues la base de dato de la facturacion que gasta un programa comercial.

...

The problem is that this database, I can not put password, because the data base of the billing that a business program spends.

Re: Error SQLBASE/1901 Not connected

Posted: Fri May 12, 2017 2:30 pm
by AidTIC
Por mas vueltas que le doy , no consigo que funcione con la Versión 3.4.4, así que me toca seguir compilando con la versión 3.4.3 :oops:
.....
For more laps I give, I do not get it to work with version 3.4.4, so I have to keep compiling with version 3.4.3 :oops:

Re: Error SQLBASE/1901 Not connected

Posted: Fri Aug 18, 2017 1:26 am
by HugoGabriel
Same is happend with this sample
C:\hmg.3.4.4\SAMPLES\HFCL\SQL\RDD_SQL\mdb

Re: Error SQLBASE/1901 Not connected

Posted: Fri Aug 18, 2017 2:42 am
by HugoGabriel
Try this way...

#include "hmg.ch"
#define adOpenForwardOnly 0
#define adOpenKeyset 1
#define adOpenDynamic 2
#define adOpenStatic 3
#define adLockReadOnly 1
#define adLockPessimistic 2
#define adLockOptimistic 3
#define adLockBatchOptimistic 4
#define adUseNone 1
#define adUseServer 2
#define adUseClient 3

PROCEDURE MAIN()

LOCAL oRs , cSql, cDb

oRs := win_oleCreateObject( "ADODB.Recordset" )
cDb := "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb"
cSql := "SELECT * FROM test ;"
oRs:Open( cSql , cDb , adOpenForwardOnly, adLockReadOnly )
WHILE !oRs:EOF
MsgInfo( oRs:Fields( "First" ):Value )
MsgInfo( oRs:Fields( "Last" ):Value )
MsgInfo( oRs:Fields( "Age" ):Value )
MsgInfo( oRs:Fields( "HireDate" ):Value )
//? "------------------------------------"
oRs:MoveNext()
ENDDO
oRs:Close()

RETURN

Re: Error SQLBASE/1901 Not connected

Posted: Thu Dec 21, 2017 1:58 pm
by marco_malac
AidTIC wrote:
Fri May 12, 2017 2:30 pm
Por mas vueltas que le doy , no consigo que funcione con la Versión 3.4.4, así que me toca seguir compilando con la versión 3.4.3 :oops:
.....
For more laps I give, I do not get it to work with version 3.4.4, so I have to keep compiling with version 3.4.3 :oops:
Yes, I Agree. I have the same error.

Re: Error SQLBASE/1901 Not connected

Posted: Thu Apr 12, 2018 9:43 am
by AidTIC
Me sigue dando error al compilar con 3.4.4.

***** Traslated ******

I still give error when compiling with 3.4.4.


la linea 93 --> IF (conn1 := RDDINFO( RDDI_CONNECT, { "ODBC", aFichAcc } )) == 1
---------------------------
Program Error
---------------------------
Error BASE/1070 Argument error: ==



Called from MAIN(93)


---------------------------
Aceptar
---------------------------