Error SQLBASE/1901 Not connected

HMG en Español

Moderator: Rathinagiri

AidTIC
Posts: 63
Joined: Mon Apr 22, 2013 8:29 am
Been thanked: 2 times

Error SQLBASE/1901 Not connected

Post by AidTIC » Thu May 04, 2017 12:05 pm

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


User avatar
serge_girard
Posts: 2052
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 411 times
Been thanked: 90 times
Contact:

Post by serge_girard » Thu May 04, 2017 12:39 pm

Wrong or missing password perhaps?

Serge

AidTIC
Posts: 63
Joined: Mon Apr 22, 2013 8:29 am
Been thanked: 2 times

Post by AidTIC » 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

User avatar
Anand
Posts: 274
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF
Has thanked: 51 times
Been thanked: 41 times

Post by Anand » Fri May 05, 2017 8:03 am

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
Image

AidTIC
Posts: 63
Joined: Mon Apr 22, 2013 8:29 am
Been thanked: 2 times

Post by AidTIC » Fri May 05, 2017 10:21 am

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.

AidTIC
Posts: 63
Joined: Mon Apr 22, 2013 8:29 am
Been thanked: 2 times

Post by AidTIC » 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:

HugoGabriel
Posts: 8
Joined: Mon Feb 24, 2014 3:13 pm

Post by HugoGabriel » Fri Aug 18, 2017 1:26 am

Same is happend with this sample
C:\hmg.3.4.4\SAMPLES\HFCL\SQL\RDD_SQL\mdb

HugoGabriel
Posts: 8
Joined: Mon Feb 24, 2014 3:13 pm

Post by HugoGabriel » Fri Aug 18, 2017 2:42 am

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

User avatar
marco_malac
Posts: 11
Joined: Mon Dec 08, 2008 12:54 pm
Location: Brazil , São Paulo-SP

Post by marco_malac » Thu Dec 21, 2017 1:58 pm

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.
========================================================
"Better than to know about the information is to know what to do with the information that you have."
Marco Antonio ( marco_malac )
Car Tuning / Bikes and adventure around the earth.

AidTIC
Posts: 63
Joined: Mon Apr 22, 2013 8:29 am
Been thanked: 2 times

Post by AidTIC » Thu Apr 12, 2018 9:43 am

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
---------------------------
Last edited by AidTIC on Thu Apr 12, 2018 11:51 am, edited 1 time in total.

Post Reply