ACCESS TO SQL VIEW

R

rob muzzy

I have a sql view that has the following code from our existing ERP.
SELECT "WORKORDER_TYPE",
"WORKORDER_BASE_ID",
"WORKORDER_LOT_ID",
"WORKORDER_SPLIT_ID",
"WORKORDER_SUB_ID",
"OPERATION_SEQ_NO",
"PIECE_NO",
"TYPE",
CASE (UNICODE(CAST(CAST("BITS" AS VARBINARY(4000)) AS NVARCHAR
(4000)))
- ASCII(LEFT(CAST("BITS" AS VARBINARY(4000)),
1))) WHEN 0 THEN CAST(CAST("BITS" AS VARBINARY(8000)) AS NVARCHAR
(4000)) ELSE CAST(CAST("BITS" AS VARBINARY(8000)) AS VARCHAR(8000))
END AS "BITS",
"BITS_LENGTH"
FROM REQUIREMENT_BINARY
WHERE "TYPE" = 'D'

I am trying to write back to the code via an access linked table and
I
am getting an error. can anyone help me fix the view so access can
write back to it
the primary keys are workorder type through type


thanks in advance
 
J

John W. Vinson

I am trying to write back to the code via an access linked table and
I
am getting an error. can anyone help me fix the view so access can
write back to it
the primary keys are workorder type through type

It's a syntax problem. Your query is in SQL/Server dialect, and Access using
JET/ACE isn't able to parse it correctly (e.g. Access uses square brackets
rather than quotes to delimit fieldnames, doesn't support CASE, etc.).

Try setting the query's Passthrough property to Yes; or recast it in Access'
dialect. Since Access doesn't support the varbinary datatype (to my knowledge)
that may require changing the logic of the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top