Error SQLBASE/1901 Not connected

HMG en Español

Moderator: Rathinagiri

User avatar
AidTIC
Posts: 117
Joined: Mon Apr 22, 2013 8:29 am
DBs Used: DBF
Contact:

Error SQLBASE/1901 Not connected

Post 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

Skydone Solutions
www.skydone.com
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Error SQLBASE/1901 Not connected

Post by serge_girard »

Wrong or missing password perhaps?

Serge
There's nothing you can do that can't be done...
User avatar
AidTIC
Posts: 117
Joined: Mon Apr 22, 2013 8:29 am
DBs Used: DBF
Contact:

Re: Error SQLBASE/1901 Not connected

Post by AidTIC »

No necesita contraseña, y es raro que compilando con 3.4.3 funcione , y con la 3.4.4 no
Skydone Solutions
www.skydone.com
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Error SQLBASE/1901 Not connected

Post 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
Regards,

Anand

Image
User avatar
AidTIC
Posts: 117
Joined: Mon Apr 22, 2013 8:29 am
DBs Used: DBF
Contact:

Re: Error SQLBASE/1901 Not connected

Post 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.
Skydone Solutions
www.skydone.com
User avatar
AidTIC
Posts: 117
Joined: Mon Apr 22, 2013 8:29 am
DBs Used: DBF
Contact:

Re: Error SQLBASE/1901 Not connected

Post 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:
Skydone Solutions
www.skydone.com
HugoGabriel
Posts: 8
Joined: Mon Feb 24, 2014 3:13 pm

Re: Error SQLBASE/1901 Not connected

Post by HugoGabriel »

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

Re: Error SQLBASE/1901 Not connected

Post 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
User avatar
marco_malac
Posts: 11
Joined: Mon Dec 08, 2008 12:54 pm
Location: Brazil , São Paulo-SP

Re: Error SQLBASE/1901 Not connected

Post 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.
========================================================
"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.
User avatar
AidTIC
Posts: 117
Joined: Mon Apr 22, 2013 8:29 am
DBs Used: DBF
Contact:

Re: Error SQLBASE/1901 Not connected

Post 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
---------------------------
Last edited by AidTIC on Thu Apr 12, 2018 11:51 am, edited 1 time in total.
Skydone Solutions
www.skydone.com
Post Reply