view result

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings and thanks for the help!
THis is truly baffling:
I have a view in SQL server 2k. The view works fine from Query Analyzer
(gives the correct result), but one of the fields is truncated when the view
is opened in Access?! Any clues about what I should check?

The particular field is a CASE statement in SQL and in SQL gives the result
"Betty Smith". Then in Access I get "Betty Sm"

Thanks for any ideas
 
Hi Sam,

I haven't encountered this myself. I have encountered a situation in
connecting to Oracle where some fields wouldn't show at all when connecting
to the table and using access queries. But, in that case, if I used a
pass-thru query to select the data, I could retrieve the fields.

Your message didn't say explicitly what method you were using to retrieve
the data, but if you are linking to the sql view as a table, then selecting
in an Access query, you may want to try using a Pass-Thru query to retrieve
the data and see if that makes a difference.

One other thing that you could do would be to check all of the field
properties for the field in question in the Access query to see if any look
like they may be creating a problem.

Sorry that may not be much help, but I thought that I would offer it.
Hopefully if those don't help there will be someone else that may have better
ideas/information. Post back if you haven't used pass-thru queries in Access
and you want more info, I'll be happy to help with that.

Ted Allen
 
Ted, thanks. The pass-through worked. I should have thought of that. (I was
linking to the view like a table). I did look at table properties on the view
and it had the field length set to 7 and was not alterable. I guess there are
quirks here and there but the pass-through will solve the problem.
Sam
 
Glad to hear it worked for you Sam. I do recall sometime back seeing a post
where someone had encountered a case where Access was for some reason
truncating the field to the length of the default value of the field. Who
knows what it may be in your case, but it's good that you found an easy work
around and won't have to worry about it.

-Ted
 
Back
Top