String length limitation? 
Author Message
 String length limitation?

Hello.

I have a function that I run in a query.

The function simply returns a string.

When I run the query the function executes but the string is truncated to
268 characters, it should be much longer.

Is there a limitation to the length of a string?

Is there a way around this or am I doing something wrong?

Anybody got any ideas?



Sat, 27 Dec 2003 01:38:53 GMT  
 String length limitation?
Does the query apply any formatting to the function output?  Does the field
have a Format property?  These can cause a string to be truncated to 255
characters, I believe.

--
Dirk Goldgar
www.datagnostics.com

(to reply via e-mail, remove NOSPAM from address)


Quote:
> Hello.

> I have a function that I run in a query.

> The function simply returns a string.

> When I run the query the function executes but the string is truncated to
> 268 characters, it should be much longer.

> Is there a limitation to the length of a string?

> Is there a way around this or am I doing something wrong?

> Anybody got any ideas?



Sat, 27 Dec 2003 03:31:58 GMT  
 String length limitation?
No, there is no formatting, the function created a recordset, loops through
the recordset appending the records into a string, then returns a string.

Quote:
> Does the query apply any formatting to the function output?  Does the
field
> have a Format property?  These can cause a string to be truncated to 255
> characters, I believe.

> --
> Dirk Goldgar
> www.datagnostics.com

> (to reply via e-mail, remove NOSPAM from address)



> > Hello.

> > I have a function that I run in a query.

> > The function simply returns a string.

> > When I run the query the function executes but the string is truncated
to
> > 268 characters, it should be much longer.

> > Is there a limitation to the length of a string?

> > Is there a way around this or am I doing something wrong?

> > Anybody got any ideas?



Sat, 27 Dec 2003 04:09:34 GMT  
 String length limitation?
And you've verified that the function returns a longer string?  Could you
post the SQL of the query?

--
Dirk Goldgar
www.datagnostics.com

(to reply via e-mail, remove NOSPAM from address)


Quote:
> No, there is no formatting, the function created a recordset, loops
through
> the recordset appending the records into a string, then returns a string.

> > Does the query apply any formatting to the function output?  Does the
> field
> > have a Format property?  These can cause a string to be truncated to 255
> > characters, I believe.

> > --
> > Dirk Goldgar
> > www.datagnostics.com

> > (to reply via e-mail, remove NOSPAM from address)



> > > Hello.

> > > I have a function that I run in a query.

> > > The function simply returns a string.

> > > When I run the query the function executes but the string is truncated
> to
> > > 268 characters, it should be much longer.

> > > Is there a limitation to the length of a string?

> > > Is there a way around this or am I doing something wrong?

> > > Anybody got any ideas?



Sat, 27 Dec 2003 04:27:00 GMT  
 String length limitation?
If you are doing this on an actual query (if you put the function on the
design view of your query) then you can only fit up to a fixed number of
characters on each filter (this is what happend to you).

or you can run the hole query on code and you wont have this limitation
(there is a limit though!).

try this:

dim db as database
dim qdf as qerydef
dim strSql as string

set db as dbengine(0)(0)
strSql = " SELECT * FROM TABLE1 WHERE " & put your function results here &
" ) "
set qdf = db.createquerydef("",strsql)
    qdf.execute
set qdf = nothing
set db = nothing

You can make the strsql as long as you need without limits.

If you still get errors, it could be the number of variables on your where
statement. Try changin your query FROM a
WHERE Field = "12" or Field ="13" or Field ="14" .....
to a
WHERE field in ("12", "13", "14",....)

If you still get errors. Try making a table with the results of your
function and then use this new table to run the query. this most of the time
runs faster than the two filters Avobe (specially with many records).

Rodrigo.


Quote:
> Hello.

> I have a function that I run in a query.

> The function simply returns a string.

> When I run the query the function executes but the string is truncated to
> 268 characters, it should be much longer.

> Is there a limitation to the length of a string?

> Is there a way around this or am I doing something wrong?

> Anybody got any ideas?



Sat, 27 Dec 2003 07:52:45 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. String Length Limitation Workaround?

2. string length limitation?

3. Limitation on HTTP string length?

4. ADOX: Extending a fixed length Jet string field length

5. .FormFields and text length limitation?

6. URL Length Limitation

7. Passing fixed length string to API and is returning nulls in string

8. String limitations

9. 64K string limitation

10. 64K string limitation problem

11. 32k String & Text Box Limitation

12. HELP 64K String limitation

 

 
Powered by phpBB® Forum Software