[Gambas-user] Database connection with gb.db.form method

Gianluigi bagonergi at gmail.com
Tue Jul 16 19:22:11 CEST 2019


Hi Jorge,
I badly explained myself.
You mean that if the database is called MyDatabase, the program is called
MyProject and is in the home folder you can't connect if MyDatabase is
directly inside MyProject (home/<my user name>/MyProject/MyDatabase).
If you add a folder for example MyFolder then it works (home/<my user
name>/MyProject/MyFolder/MyDatabase).

The same happens here.

I, on the other hand, would like to understand how to make the connection
created with the graphic system of the gb.db.form component work, with
MyFolder/MyDatabase located outside MyProject.
How can the connection work only if the database is in the project (even if
in another folder)?
There must be a way to compile the project without compromising its
operation.
What is it that my old brain can't understand?

Regards
Gianluigi

Il giorno mar 16 lug 2019 alle ore 18:28 Jorge Carrión <shordi at gmail.com>
ha scritto:

> No, just the opposite: I can't connect in the application.path. Creating a
> new directory inside the application.path it'worked... but I didn't try
> further things...
> I don't dare to isolate the bug (if its a bug).
>
> Regards.
>
> El mar., 16 jul. 2019 a las 13:36, Gianluigi (<bagonergi at gmail.com>)
> escribió:
>
>> Hi Jorge,
>> thank you very much for the reply.
>> So are you telling me that it is impossible to connect graphically to a
>> database located outside the application?
>> The wiki on this topic is ambiguous...
>>
>> Regards
>> Gianluigi
>>
>> Il giorno mar 16 lug 2019 alle ore 12:19 Jorge Carrión <shordi at gmail.com>
>> ha scritto:
>>
>>> I had a similar issue a few days ago but in my case the .host of the
>>> connection was the /home/user/gambasprojects/project what is the
>>> application.path. I created a folder inside
>>> (/home/user/gambasprojects/project/Datos) and all works fine then.
>>> I thought it was a exected behaviour...
>>>
>>> Regards
>>>
>>>
>>> El mar., 16 jul. 2019 a las 11:11, Gianluigi (<bagonergi at gmail.com>)
>>> escribió:
>>>
>>>> Hi Hans,
>>>> thanks for the help but unfortunately I always get error:
>>>> See attached image.
>>>> I tried to connect to your test database, these are my passages.
>>>>
>>>> FMain properties:
>>>> Arrangement = Vertical
>>>>
>>>> DataSource1 properties:
>>>> Arrangement = Vertical
>>>> Connection = Connection1
>>>> Expand = True
>>>> Table = mausi
>>>>
>>>> DataBrowser1 properties:
>>>> Columns id (table with one column)
>>>> Editable = True
>>>> Expand = True
>>>>
>>>> FMain.class code:
>>>> Public Sub Form_Open()
>>>>   Connections["Connection1"].Open
>>>> End
>>>>
>>>> Public Sub Form_Close()
>>>>   Connections["Connection1"].Close
>>>> End
>>>>
>>>> Components:
>>>> gb
>>>> gb.db
>>>> gb.db.form
>>>> gb.form
>>>> gb.gui (or gb.gui.qt)
>>>> gb.image
>>>> I try also with adding gb.db.sqlite3
>>>>
>>>> Regards
>>>> Gianluigi
>>>>
>>>> Il giorno lun 15 lug 2019 alle ore 23:37 Gianluigi <bagonergi at gmail.com>
>>>> ha scritto:
>>>>
>>>>> Hi,
>>>>> I can't get the connection through only the graphic of the gb.db.form
>>>>> component.
>>>>> See attached project.
>>>>>
>>>>> In a Balloon on Debug Common.CheckDB.34 I get:
>>>>> Unable to locate database 'test' in '~/database'
>>>>>
>>>>> Am I wrong with the settings or is it a bug?
>>>>>
>>>>> Regards
>>>>> Gianluigi
>>>>>
>>>>
>>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
>>>> ]----
>>>>
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190716/b0cd3c0b/attachment.html>


More information about the User mailing list