[Gambas-user] Stumped by .99

ron ronstk at ...239...
Sun Sep 19 07:19:07 CEST 2004


On Sunday 19 September 2004 03:47, Craig Packard wrote:
> I seem to be having a lot of trouble doing things in .99 that I could
> do in .97.
> 
> 1. I can't get the 'watch' window to work at all.  I can't even get
> the window to 'undock' from the project window?  This makes it very
> difficult to read the current value of the varable(s) I'm watching. 
> Can I make this a seperate window still?  Everything I try to watch
> just tells me: "ERROR: Cannot load class 'TextBox5: Unable to load
> class file"  When I watch TextBox5.Text or for that matter any
> textbox. . . Is anyone else using the watch window?
>

"ERROR: Cannot load class 'TextBox5: Unable to load class file"
You have a error is the code somewhere at run time

> 
> 2. I also have the 96 resources unfreed (or whatever it is) error that
> others have reported.

linux distro ?
version conflict QT ?


> 3. I'm having a lot of trouble with MySQL.  I can't get the moveto
> function of the result object to work at all.  I'll try something
> like:
> 
>   Conn.Open
>   rData = Conn.Edit("customers")
>   i = rData.MoveTo[CInt(txtRecNumber.Text)]
> 
> And it constantly throws an error: "Not an object"
> 
>                            - Craig
> 

Do you have?

DIM $hConn As NEW Connection

WITH $hConn
   .Type = "postgresql"
   .Host = "localhost"
   .Login = "username"
   .Password = "passwd"
   .Name = "testdb"
END WITH

TRY $hConn.Open
IF Error THEN PRINT "Cannot Open Database. Error = "; Error.Text

See Connection.Open again in help
Pay attention to the TRY and IF Error line!

---------------------------

 Conn.Edit("customers") requires Primary key in table for this.
See Changelog
Did you declare rData ?

----------------------

change 
   i = rData.MoveTo[CInt(txtRecNumber.Text)]
to
   i = rData.MoveTo(VAL(txtRecNumber.Text))  
For rData.MoveTo see help for syntax.  Not [] but ()

Note: Cint should be right but its argument must be real number 
as numeric or "123".  A pure ASCII string as 3 bytes.
A textbox.text is for some reason not qualified as argument for CInt().
Can be different character set and is not always pure ASCII.
In a logic view you are right to use it, but practice is different.

---------------

> And it constantly throws an error: "Not an object"
Where is it thrown. The line?

If the Conn.Open not works then  Conn.Edit() does not work
and then there is no rData.

And is this the only project that fails for MySQL or all
other projects to.
In lather case, is MySQL included during compile phase and 
is the mysql-devel package installed?









More information about the User mailing list