 |
|
 |
|
Next: Exporting Text from PPT to Access
|
| Author |
Message |
External

Since: Feb 13, 2007 Posts: 1
|
(Msg. 1) Posted: Tue Feb 13, 2007 10:53 am
Post subject: Long Select gets truncated Archived from groups: microsoft>public>vb>database>dao (more info?)
|
|
|
Select
'0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,'
As Letter From Lists
Substitute list for any table name. When run in access it returns the
correct result, when run in vb, it returns only the first 255 char.
Why and is there any workaround? >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 2) Posted: Wed Feb 14, 2007 9:12 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 13 Feb 2007 10:53:17 -0800, wrote:
¤ Select
¤ '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,'
¤ As Letter From Lists
¤
¤ Substitute list for any table name. When run in access it returns the
¤ correct result, when run in vb, it returns only the first 255 char.
¤
¤
¤ Why and is there any workaround?
Not sure if I understand your question. Are you referring to the number of "columns" (which is
limited to 255 per table) or the number of "characters" per column (which would require a memo type
column)?
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Feb 16, 2007 Posts: 6
|
(Msg. 3) Posted: Fri Feb 16, 2007 7:30 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Just check the results. You would see that after 255 chars it displays
question marks and gibberish. But in access it is good. Only in vb dao it
gets truncated.
"Paul Clement" wrote:
> On 13 Feb 2007 10:53:17 -0800, wrote:
>
> ¤ Select
> ¤ '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,'
> ¤ As Letter From Lists
> ¤
> ¤ Substitute list for any table name. When run in access it returns the
> ¤ correct result, when run in vb, it returns only the first 255 char.
> ¤
> ¤
> ¤ Why and is there any workaround?
>
> Not sure if I understand your question. Are you referring to the number of "columns" (which is
> limited to 255 per table) or the number of "characters" per column (which would require a memo type
> column)?
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 4) Posted: Fri Feb 16, 2007 1:52 pm
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Fri, 16 Feb 2007 07:30:30 -0800, JL wrote:
¤ Just check the results. You would see that after 255 chars it displays
¤ question marks and gibberish. But in access it is good. Only in vb dao it
¤ gets truncated.
¤
Are you using GetChunk to read the data from the column?
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Feb 16, 2007 Posts: 6
|
(Msg. 5) Posted: Fri Feb 16, 2007 1:52 pm
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
No. It want let. Because it shows the field as type text size 0 But if you
check the length it shows the correct size 4088. Did you try running the
query. It would be easier for you to just run it and you will see it for
yourself.
"Paul Clement" wrote:
> On Fri, 16 Feb 2007 07:30:30 -0800, JL wrote:
>
> ¤ Just check the results. You would see that after 255 chars it displays
> ¤ question marks and gibberish. But in access it is good. Only in vb dao it
> ¤ gets truncated.
> ¤
>
> Are you using GetChunk to read the data from the column?
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 6) Posted: Tue Feb 20, 2007 10:14 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Fri, 16 Feb 2007 12:03:40 -0800, JL wrote:
¤ No. It want let. Because it shows the field as type text size 0 But if you
¤ check the length it shows the correct size 4088. Did you try running the
¤ query. It would be easier for you to just run it and you will see it for
¤ yourself.
¤
I think the problem is that ADO and DAO both default to Text as the data type instead of Memo. The
Text data type only supports up to 255 characters.
Apparently Microsoft Access is smart enough to determine the correct data type.
I don't know of any way to specify the data type for the column in a SELECT statement.
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Feb 16, 2007 Posts: 6
|
(Msg. 7) Posted: Tue Feb 20, 2007 10:14 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
So this is a bug of Microsoft. should i report it as such? And where can a
report it?
Also doesn't access internally use the same jet engine. If yes then how do
they do it?
"Paul Clement" wrote:
> On Fri, 16 Feb 2007 12:03:40 -0800, JL wrote:
>
> ¤ No. It want let. Because it shows the field as type text size 0 But if you
> ¤ check the length it shows the correct size 4088. Did you try running the
> ¤ query. It would be easier for you to just run it and you will see it for
> ¤ yourself.
> ¤
>
> I think the problem is that ADO and DAO both default to Text as the data type instead of Memo. The
> Text data type only supports up to 255 characters.
>
> Apparently Microsoft Access is smart enough to determine the correct data type.
>
> I don't know of any way to specify the data type for the column in a SELECT statement.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 8) Posted: Tue Feb 20, 2007 1:23 pm
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 20 Feb 2007 09:49:02 -0800, JL wrote:
¤ So this is a bug of Microsoft. should i report it as such? And where can a
¤ report it?
¤
¤ Also doesn't access internally use the same jet engine. If yes then how do
¤ they do it?
Well no they're not the same. There are features in Microsoft Access that are not supported or
different in DAO and ADO. For example you cannot run user-defined VBA code from a Jet SQL statement
through DAO or ADO.
Is there a reason why you need to run code like this? Perhaps there's an alternative solution.
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Feb 16, 2007 Posts: 6
|
(Msg. 9) Posted: Tue Feb 20, 2007 1:23 pm
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
First thanks for trying to help.
What i was using it for was to create a merged documents with the fields for
example
Select "Dear " & FirstName & " " & LastName & chr(13) As Letter From MyTable.
The workaround i am using is to pass the whole string to the scripting
engine like this
"Dear " & rst!FirstName & " " & rst!LastName & chr(13)
And i use the results.
"Paul Clement" wrote:
> On Tue, 20 Feb 2007 09:49:02 -0800, JL wrote:
>
> ¤ So this is a bug of Microsoft. should i report it as such? And where can a
> ¤ report it?
> ¤
> ¤ Also doesn't access internally use the same jet engine. If yes then how do
> ¤ they do it?
>
> Well no they're not the same. There are features in Microsoft Access that are not supported or
> different in DAO and ADO. For example you cannot run user-defined VBA code from a Jet SQL statement
> through DAO or ADO.
>
> Is there a reason why you need to run code like this? Perhaps there's an alternative solution.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 10) Posted: Wed Feb 21, 2007 8:50 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 20 Feb 2007 11:45:18 -0800, JL wrote:
¤ First thanks for trying to help.
¤
¤ What i was using it for was to create a merged documents with the fields for
¤ example
¤ Select "Dear " & FirstName & " " & LastName & chr(13) As Letter From MyTable.
¤
¤ The workaround i am using is to pass the whole string to the scripting
¤ engine like this
¤
¤ "Dear " & rst!FirstName & " " & rst!LastName & chr(13)
¤
¤ And i use the results.
Not sure if I follow this completely. Why is this column being created "on the fly" in a SELECT SQL
statement instead of using a data source (such as MEMO column in a table)? And if you're not using a
data source then why does the text need to be in the result of the SELECT statement?
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Feb 16, 2007 Posts: 6
|
(Msg. 11) Posted: Wed Feb 21, 2007 1:05 pm
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I have a table with the fields LastName, FirstName Etc.
I would like to create a document for each person.
"Paul Clement" wrote:
> On Tue, 20 Feb 2007 11:45:18 -0800, JL wrote:
>
> ¤ First thanks for trying to help.
> ¤
> ¤ What i was using it for was to create a merged documents with the fields for
> ¤ example
> ¤ Select "Dear " & FirstName & " " & LastName & chr(13) As Letter From MyTable.
> ¤
> ¤ The workaround i am using is to pass the whole string to the scripting
> ¤ engine like this
> ¤
> ¤ "Dear " & rst!FirstName & " " & rst!LastName & chr(13)
> ¤
> ¤ And i use the results.
>
> Not sure if I follow this completely. Why is this column being created "on the fly" in a SELECT SQL
> statement instead of using a data source (such as MEMO column in a table)? And if you're not using a
> data source then why does the text need to be in the result of the SELECT statement?
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
External

Since: Sep 02, 2003 Posts: 526
|
(Msg. 12) Posted: Fri Feb 23, 2007 9:44 am
Post subject: Re: Long Select gets truncated [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 21 Feb 2007 13:05:25 -0800, JL wrote:
¤ I have a table with the fields LastName, FirstName Etc.
¤
¤ I would like to create a document for each person.
¤
Is the document based upon the information in the table? If so, why not build the document outside
of the Recordset?
Paul
~~~~
Microsoft MVP (Visual Basic) >> Stay informed about: Long Select gets truncated |
|
| Back to top |
|
 |  |
| Related Topics: | " und ' in SQL SELECT Kommando - Hallo, Mit folgendem Kommando bilde ich ein SQL String: x_sql = "SELECT * FROM tmp_rg WHERE Bezeichnung = """ & my_Bez & """ " set sy = db.OpenRecordset(x_sql, 2) usw. und dass funktioniert ...
dao select query problem in mfc C++ - hi, i'm using dao for the first time to connect to a MS Access db. I've been following the MS example for a very basic query. This is the MS example: The following code shows the process of creating a recordset from a querydef: // pdb is a pointer t...
mysterious "SELECT" error during "priint preview" in Acces.. - When I try to "print preview" a report based on a table, I find myself faced with a "The "SELECT" statement includes a reserved word or argument name that is misspelled or missing, or the punctuation is incorrect" error, aft...
strange! vb6+access2002 - I have a mdb called treesy.mdb.There is a table,named transcipt with three fields:serial_no, eng,sound serial_no:1-10 (10 numbers) eng: 1.The movie has been on for 15 minutes, madam.@ 2.Oh, my god!@ It's 7:45 now!@ 3.Is Helen coming?@ It¡¯s 6:50 now.@..
Authentication Error??? - Ok so heres the code.. for some reason I kept getting the no permissions message, so I attempted to add the access workgroup file. Now I get the "Authentication Failed" message. This is a secure database. HELP.. I know I'm writing (adding) som... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|