I have written the most sophisticated program of all :

dim a,b as string
onerror goto crash
a=""
boucle:
a=a+"A"
b="print "+""""+a+""""
print len(b)
run command b
goto boucle
goto fin
crash:
print "error "+err()
fin:
end program

and it gets stuck on a command at 508 characters (error 965, expression too
complex). The run command accepts thus a string of 507characters. That would
be 512 - 5 (let us assume that it is some code id).

Aren't they other places in MI where the 512 character limit is imposed?
Don't I remember something of the sort with the "where" clause of the SQL
requester?


Jacques PARIS

e-mail    [EMAIL PROTECTED]
For MapInfo support, see the Paris PC Consult enr. site  at
http://www.total.net/~rparis/gisproducts.htm

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mike Taylor
Sent: September 21, 2000 1:04 AM
To: 'Mapinfo List'
Subject: RE: MI MB: Run Command Limitation

Hi again

Seems I spat the dummy at the wrong statement.
I changed the string (from select to print) that I was sending to run
command. eg,
From:
        qs = "select ... <lots of stuff> ... from table into anothertable"
        run command qs
To:
        qs = "print ""select ... <lots of stuff> ... from table into
anothertable"""
        run command qs

This worked fine, so I will change my question to why is this happening with
select??
The amount of characters seems to be variable as well depending on the
expression?
I've attached a program which will generate the problem on my machine.


-----Original Message-----
From: Mike Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 21 September 2000 15:20
To: 'Mapinfo List'
Subject: MI MB: Run Command Limitation


Hi

I seem to have run into a size limitation on the string you can pass to run
command.  It works when I trim the string down to 421 characters and fails
(badly, invalid page fault) when it is 422 characters.
The command also fails when I put it into the mapbasic window of
professional.
Is there any workaround for this?
Why is 422 the magic number?
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to