You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Bayless Kirtley <bk...@cox.net> on 2022/06/22 12:19:23 UTC

Session question

I have an application that could really use a local temporary table but 
I can't seem to make it work. One class creates and populates the table 
then passes the Connection to  another class that wants to use it. The 
second class sees the table but finds it empty. What am I doing wrong? I 
am using hsqldb 2.5.0 in an app that requires Java 8. My development 
system is Linux Mint 20.

Thanks

Bayless


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


RE: Session question

Posted by "Greenberg, Gary" <gg...@visa.com.INVALID>.
JDBC does not commit by default. You can specify auto-commit upon establishing connection, though.

-----Original Message-----
From: Bayless Kirtley <bk...@cox.net> 
Sent: Wednesday, June 22, 2022 5:42 PM
To: users@netbeans.apache.org
Subject: Re: Session question

thanks for the suggestion, Gary. I was not committing. My understanding is that JDBC commits everything by default unless set otherwise. Anyway, I added a commit and still no success.

Bayless


On 6/22/22 12:12, Greenberg, Gary wrote:
> Are you committing your changes?
>
> -----Original Message-----
> From: Bayless Kirtley <bk...@cox.net>
> Sent: Wednesday, June 22, 2022 5:19 AM
> To: List, Netbeans <us...@netbeans.apache.org>
> Subject: Session question
>
> I have an application that could really use a local temporary table but I can't seem to make it work. One class creates and populates the table then passes the Connection to  another class that wants to use it. The second class sees the table but finds it empty. What am I doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. My development system is Linux Mint 20.
>
> Thanks
>
> Bayless
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwik
> i.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;d
> ata=05%7C01%7Cggreenbe%40visa.com%7C4bf8e201dd184a1737c008da54b1586c%7
> C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637915417916804945%7CUnkno
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> CJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=97PCOWMAtJSgE4DF9MWgjcH%2BFAxH
> %2Bd8fQkSxwKrhTdE%3D&amp;reserved=0
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwik
> i.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;d
> ata=05%7C01%7Cggreenbe%40visa.com%7C4bf8e201dd184a1737c008da54b1586c%7
> C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637915417916804945%7CUnkno
> wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
> CJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=97PCOWMAtJSgE4DF9MWgjcH%2BFAxH
> %2Bd8fQkSxwKrhTdE%3D&amp;reserved=0
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7C4bf8e201dd184a1737c008da54b1586c%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637915417916804945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=97PCOWMAtJSgE4DF9MWgjcH%2BFAxH%2Bd8fQkSxwKrhTdE%3D&amp;reserved=0


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Session question

Posted by Bayless Kirtley <bk...@cox.net>.
thanks for the suggestion, Gary. I was not committing. My understanding 
is that JDBC commits everything by default unless set otherwise. Anyway, 
I added a commit and still no success.

Bayless


On 6/22/22 12:12, Greenberg, Gary wrote:
> Are you committing your changes?
>
> -----Original Message-----
> From: Bayless Kirtley <bk...@cox.net>
> Sent: Wednesday, June 22, 2022 5:19 AM
> To: List, Netbeans <us...@netbeans.apache.org>
> Subject: Session question
>
> I have an application that could really use a local temporary table but I can't seem to make it work. One class creates and populates the table then passes the Connection to  another class that wants to use it. The second class sees the table but finds it empty. What am I doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. My development system is Linux Mint 20.
>
> Thanks
>
> Bayless
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7Ca2550a9c81004b6c8ffd08da54498f77%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637914972168873803%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=s8XeynwFM89Y%2BpVPYP3Zvpsvbh26zyeXdqjlb1bjsX8%3D&amp;reserved=0
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


RE: Session question

Posted by "Greenberg, Gary" <gg...@visa.com.INVALID>.
Are you committing your changes?

-----Original Message-----
From: Bayless Kirtley <bk...@cox.net> 
Sent: Wednesday, June 22, 2022 5:19 AM
To: List, Netbeans <us...@netbeans.apache.org>
Subject: Session question

I have an application that could really use a local temporary table but I can't seem to make it work. One class creates and populates the table then passes the Connection to  another class that wants to use it. The second class sees the table but finds it empty. What am I doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. My development system is Linux Mint 20.

Thanks

Bayless


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7Ca2550a9c81004b6c8ffd08da54498f77%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637914972168873803%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=s8XeynwFM89Y%2BpVPYP3Zvpsvbh26zyeXdqjlb1bjsX8%3D&amp;reserved=0


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Session question

Posted by Bayless Kirtley <bk...@cox.net>.
It is a fairly complex application but I will try to produce a smaller 
example to show some code. Of course, my luck is that the smaller set 
will probably work as expected. More tomorrow. Thanks for the suggestion.

Bayless


On 6/22/22 08:10, Amn wrote:
>
> A little bit of code and a larger description of your solution would 
> go a long way. Please try again 😁
>
> On 2022-06-22 8:19 a.m., Bayless Kirtley wrote:
>> I have an application that could really use a local temporary table 
>> but I can't seem to make it work. One class creates and populates the 
>> table then passes the Connection to  another class that wants to use 
>> it. The second class sees the table but finds it empty. What am I 
>> doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. 
>> My development system is Linux Mint 20.
>>
>> Thanks
>>
>> Bayless
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
> -- 
> *Using Fire Fox and Thunderbird.*
> Developing for Android using Java, C/C++, HTM/CSS and SQLite as our 
> platform has been exciting and most rewarding.
> [ Ñ ]
>
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> 	Virus-free. www.avg.com 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Re: Session question

Posted by Amn <am...@gmail.com>.
A little bit of code and a larger description of your solution would go 
a long way. Please try again 😁

On 2022-06-22 8:19 a.m., Bayless Kirtley wrote:
> I have an application that could really use a local temporary table 
> but I can't seem to make it work. One class creates and populates the 
> table then passes the Connection to  another class that wants to use 
> it. The second class sees the table but finds it empty. What am I 
> doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. 
> My development system is Linux Mint 20.
>
> Thanks
>
> Bayless
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
-- 
*Using Fire Fox and Thunderbird.*
Developing for Android using Java, C/C++, HTM/CSS and SQLite as our 
platform has been exciting and most rewarding.
[ Ñ ]

-- 
This email has been checked for viruses by AVG.
https://www.avg.com

Re: Session question

Posted by Bayless Kirtley <bk...@cox.net>.
My apologies. I did post the question to the HSQL user list. I am also a 
Netbeans user (exclusively) and may have posted it here accidently.

Bayless


On 6/22/22 20:50, Guy Daniel wrote:
> Hi Bayless,
>
> HSQL is probably just storing everything in RAM, so unless you hand 
> the same connection to the second class you may not see the data.
>
> Just to test, try using a connection to a MariaDB instance or some SQL 
> that stores onto the disk by default?
>
> You could post code, but I think the answer to your question would be 
> in the HSQL documentation - maybe ask at a forum where people are used 
> to using HSQL?
>
> You will find that this forum contains a large variety of devs with 
> extensive experience in many areas, but it's main focus is on the 
> inner workings and use of netbeans.
>
> Thanks!
>
> Guy
>
>
> On 6/22/22 22:19, Bayless Kirtley wrote:
>> I have an application that could really use a local temporary table 
>> but I can't seem to make it work. One class creates and populates the 
>> table then passes the Connection to  another class that wants to use 
>> it. The second class sees the table but finds it empty. What am I 
>> doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. 
>> My development system is Linux Mint 20.
>>
>> Thanks
>>
>> Bayless
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Session question

Posted by Guy Daniel <ne...@pctechs.net.au>.
Hi Bayless,

HSQL is probably just storing everything in RAM, so unless you hand the 
same connection to the second class you may not see the data.

Just to test, try using a connection to a MariaDB instance or some SQL 
that stores onto the disk by default?

You could post code, but I think the answer to your question would be in 
the HSQL documentation - maybe ask at a forum where people are used to 
using HSQL?

You will find that this forum contains a large variety of devs with 
extensive experience in many areas, but it's main focus is on the inner 
workings and use of netbeans.

Thanks!

Guy


On 6/22/22 22:19, Bayless Kirtley wrote:
> I have an application that could really use a local temporary table 
> but I can't seem to make it work. One class creates and populates the 
> table then passes the Connection to  another class that wants to use 
> it. The second class sees the table but finds it empty. What am I 
> doing wrong? I am using hsqldb 2.5.0 in an app that requires Java 8. 
> My development system is Linux Mint 20.
>
> Thanks
>
> Bayless
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists