[Gambas-user] gmd crashes on PostgreSQL (other 1/2 solved)

Benoit Minisini gambas at ...1...
Tue Feb 17 20:07:43 CET 2004


On Monday 16 February 2004 21:19, Charlie Reinl wrote:
> Salut,
>
> I added the following
>
> PUBLIC SUB tbvData_Data(Row AS Integer, Column AS Integer)
>   $rData.MoveTo(Row)
>   IF $sCharset THEN
>     tbvData.Data.Text = Conv(Str($rData[tbvData.Columns[Column].Text]),
> $sCharset, Desktop.Charset)
>   ELSE
>     tbvData.Data.Text = Str($rData[tbvData.Columns[Column].Text])
>   ENDIF
>   CATCH
>     ' Convert Error
>     IF  Error.code = 31 THEN
>       LabelWarn.Visible=TRUE
>       LabelWarn.Text = "Message.Error is up"
>       Message.Error("[" & Error.code & "]  " & Error.text & gb.newline &
> gb.newline & " try to switch off 'Use encoding (" &  $sCharset & ")'")
>       fmain.mnuUseDatabaseEncoding_Click()
>       LabelWarn.Text = ""
>       LabelWarn.Visible=FALSE
>     ENDIF
>     Error.clear
> END
>
> the following to catch the 'Unsupported String Conversation' Error.
>
> Amicalement
> Charlie
>
> to catch the 'Unsupported String Conversation'
>

One should check if 'SQL_ASCII' means actually 'ASCII'. If it does, then the 
gdbm could translate 'SQL_ASCII' into 'ASCII' itself, so that Conv$() works.

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list