[Gambas-user] Non terminated String

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Feb 3 21:18:32 CET 2010


> gambas 3 (or 2.99), revision i can't see :-(

 svn info


> S = SF & "SQL = SQL " & Chr(34) & " user = '" & Chr(34) & " & mOPT.CurUser & " & Chr(34) & "',"

 " & mOPT.CurUser & " is inside of quote marks??


Jussi



> then write it with:
> Print #hf2, S
>
> Meanwhile I have solved it in another manner; because the last two lines
> of SQL adding a record are always the same (storing user and creation
> time), I just wrote a little textfile which I read here instead of
> putting together the strings with &, and that works fine.
>
> I still do not understand what is happening with the concatenation, but
> hope I will not drop into that any more. I make an SVN-Update tonight
> and hope for the best.
>
> thanks for your time and concern,
> regards
> Dag
>
>
>
> Am Mittwoch, den 03.02.2010, 21:30 +0200 schrieb Jussi Lahtinen:
>> I don't understand your problem.
>> What is your Gambas version and revision?
>> What are data types of SQL, S and mOPT.CurUser (I assume string)?
>> And what is the exact line of code that generates described error message?
>> With Gambas3 rev 2660 (@Ubuntu 9.10 64bit) I couldn't reproduce your problem.
>>
>> Jussi
>>
>>
>> On Wed, Feb 3, 2010 at 20:56, Dag Jarle Johansen
>> <dag.jarle.johansen at ...2312...> wrote:
>> > Hi all,
>> >
>> > I can't figure out what I have wrong here. I am generating subs and
>> > functions, and use a lot of string-handling. In just one line I become
>> > the error: Non terminated String, looks like this:
>> >
>> > (1)
>> > SQL = SQL & "user ='" & mOPT.CurUser & "',"
>> >
>> > the source generating is:
>> > (2)
>> > S = SF & "SQL = SQL " & Chr(34) & " user = '" & Chr(34) & " &
>> > mOPT.CurUser & " & Chr(34) & "',"
>> >
>> > SF is just 4 Spaces.
>> >
>> > if I  (in 1) delete the space after "user='"_, here marked with an _, it
>> > works. I have many lines generated, everywhere else it works.
>> >
>> > to make it eaysier to see:
>> >
>> > SQL = SQL & "user ='"_& mOPT.CurUser & "',"
>> > the problem is here  ^
>> >
>> >
>> > does anyone have an idea?
>> >
>> > thanks and regards,
>> > Dag
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The Planet: dedicated and managed hosting, cloud storage, colocation
>> > Stay online with enterprise data centers and the best network in the business
>> > Choose flexible plans and management services without long-term contracts
>> > Personal 24x7 support from experience hosting pros just a phone call away.
>> > http://p.sf.net/sfu/theplanet-com
>> > _______________________________________________
>> > Gambas-user mailing list
>> > Gambas-user at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list