Passthrough query returns records >255 chars, how do i update memo field in table?

hardrock

Registered User.
Local time
Today, 11:19
Joined
Apr 5, 2007
Messages
166
hi all, i have looked around the forum for an answer to my problem but have not found a solution, so here goes!

I'm using a passthrough query to collect some text data off my works sql server. The fetch works fine however, the text string result is often greater than 255 characters long. I note that as soon as the 255 character threshold is met, the query will insert the remainder text on the next line of the query. My question is how do i read all lines in the result and insert the complete result into a "memo field" within my table? I want to use an update query or similar?

Any ideas? Thanks
 
Re: Passthrough query returns records >255 chars, how do i update memo field in table

hi all, i have looked around the forum for an answer to my problem but have not found a solution, so here goes!

I'm using a passthrough query to collect some text data off my works sql server. The fetch works fine however, the text string result is often greater than 255 characters long. I note that as soon as the 255 character threshold is met, the query will insert the remainder text on the next line of the query. My question is how do i read all lines in the result and insert the complete result into a "memo field" within my table? I want to use an update query or similar?

Any ideas? Thanks

Sounds like your SQL Server String Data is defined as Varchar(255). Is there any reason that you cannot define it as Varchar(MAX)? That works the same was as a Memo Field.
 
Re: Passthrough query returns records >255 chars, how do i update memo field in table

Hi Rookie, no Varchar is defined. It's a simple

select x
from mytable(on server)
where z = AA

I've got vba creating the passthrough query

As i say, the whole result is returned, but across two lines in the query. Need to figure out how to read both lines from the query and update to a memo field in Table.. Thanks
 
Re: Passthrough query returns records >255 chars, how do i update memo field in table

Hi Rookie, no Varchar is defined. It's a simple

select x
from mytable(on server)
where z = AA

I've got vba creating the passthrough query

As i say, the whole result is returned, but across two lines in the query. Need to figure out how to read both lines from the query and update to a memo field in Table.. Thanks

I believe that I understand the basics here, but On the SQL Server that I have, every table needs to be designed before it can be implemented, and the standard Varchar types that I have encountered, are Varchar(50), VarChar(255), and Varchar(MAX).

Your table (myTable) must be structured in a similar manner. Take a look at its design and determine what kind of varchar was used when defining the column x
 
Re: Passthrough query returns records >255 chars, how do i update memo field in table

Hi Rookie, no Varchar is defined. It's a simple

select x
from mytable(on server)
where z = AA

I've got vba creating the passthrough query

As i say, the whole result is returned, but across two lines in the query. Need to figure out how to read both lines from the query and update to a memo field in Table.. Thanks

I believe that I understand the basics here, but On the SQL Server that I have, every table needs to be designed before it can be implemented, and the standard Varchar types that I have encountered, are Varchar(50), VarChar(255), and Varchar(MAX).

Your table (myTable) must be structured in a similar manner. Take a look at its design and determine what kind of varchar was used when defining the column x.
 

Users who are viewing this thread

Back
Top Bottom