If you have a postgresDatabase and try db.SQLSelect() when the db is not
connected you get a crash
Date/Time: 2004-07-30 12:41:26 +1000
OS Version: 10.3.4 (Build 7H63)
Report Version: 2
Command: My Application.debug
Path: /Applications/REALbasic 5a5 Mac OS X/My Application.debug
Version: ??? (???)
PID: 1997
Thread: 0
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00001004
Thread 0 Crashed:
0 Plugin 0x000c2a80 0xbb000 + 0x7a80
1 Plugin 0x000bcd8c 0xbb000 + 0x1d8c
2 Plugin 0x000bdef8 0xbb000 + 0x2ef8
3 Plugin 0x000be350 0xbb000 + 0x3350
4 RBFramework 0x004da530 0x409780 + 0xd0db0
5 main 0x00405bb4
Window1.Window1.PushButton1_Action%%o<Window1> + 0x388
6 RBFramework 0x0048022c 0x409780 + 0x76aac
7 RBFramework 0x0043363c 0x409780 + 0x29ebc
To Produce
New project
New button
--
dim d As new PostgreSQLDatabase
Dim rs As RecordSet
d.DatabaseName = "test"
d.Host = "localhost"
d.Password = ""
d.UserName = "postgers"
d.Port = 5432
rs = d.SQLSelect("SELECT now()")
If rs <> nil Then
MsgBox rs.Field("now").StringValue
End
--
Run
Click Button
Crash
Workaround
1)
Make sure its connected.
This is not as easy as
If db.connect Then
db.SQLSelect()
End
Cause db.Connect opens a new connection every time.
This is bad cause there is no way to access the older connections
After time you hit a limit of max connections - 2000 or so
postgres log
LOG: could not fork new process for connection: Resource temporarily
unavailabe
LOG: could not fork checkpoint process: Resource temporarily unavailable
db.Close doesn't close the connection correctly the postgres log file says
LOG: unexpected EOF on client connection
2)
Use pgSQL4RB - nice program but AU$500 to use a free database I think not.
Bug ID
http://www.realsoftware.com/feedback/viewreport.php?reportid=yyycesuc
10.3.4
RB 5.5.3
Dane
_______________________________________________
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|