Subject Re: [firebird-support] Re: Firebird, Access and views, ODBC tracing
Author Eric E
Hi Alan,
Thanks for the answers, Alan. My apologies for the long message - I
will keep them shorter in the future.

So if I understand you right, Access should be using a different ODBC
call to insert into (technically through) a view than into table. Is
this true? Is there somewhere I can find more info on what ODBC calls
Access _should_ be making in order to use a view for inserts?

Thanks,

Eric

ODBC traces:

From the ODBC trace of the unsuccessful insert, the statement is:
AuctionDB-ODBC 74c-464 EXIT SQLExecDirectW with return code 0
(SQL_SUCCESS)
HSTMT 08122E90
WCHAR * 0x09C44290 [ -3] "INSERT INTO
"CURRENT_YEAR_PAYMENTS"
("PAYMENTDATE","PAYMENTMETHOD","AMOUNT","PAYMENTFOR","INVITEEID","AUCTIONYEAR")
VALUES (?,?,?,?,?,?)\ 0"
SDWORD -3

and the successful one is:
HSTMT 08124CA0
WCHAR * 0x12144138 [ -3] "INSERT INTO
"PAYMENTS"
("PAYMENTDATE","PAYMENTMETHOD","AMOUNT","PAYMENTFOR","INVITEEID","AUCTIONYEAR")
VALUES (?,?,?,?,?,?)\ 0"
SDWORD -3

I can succesfully insert into (thru) the view through a pass-through query.

AuctionDB-ODBC 6b4-6b8 EXIT SQLExecDirectW with return code 0
(SQL_SUCCESS)
HSTMT 08443798
WCHAR * 0x0013DE84 [ -3] "INSERT INTO
CURRENT_YEAR_PAYMENTS(PaymentDate,PaymentMethod,Amount,PaymentFor,InviteeID,AuctionYear)\
d\ aVALUES ('10-31-04','Check',122.22,'Item',222,2004);\ 0"
SDWORD -3



Alan McDonald wrote:

>>Hi all,
>> Attached are a couple ODBC traces for this problem, one for a failed
>>insert into the view, and one for a succesful insert. My guess is that
>>either:
>>a) there's a problem converting Access' date format to Firebird that
>>shows up in views, but not in tables
>>or
>>b) there's a bug in the ODBC driver's handling of inserts into views.
>>
>>However, I can't see from these trace logs how Access submits the data
>>values in either case. Does anyone have any ideas, or should I pass
>>this question along to the ODBC lists?
>>
>>Thanks,
>>
>>Eric
>>
>>
>
>this message size is bad form eric..
>anyway - as far as Access is concerned - when it looks into an FB database,
>a view is returned as a table i.e. access thinks it's a table but it's not.
>check the insert statement and make sure it's not trying to insert into
>VIEWNAME. if it is, then that's the problem. It has to insert into
>TABLENAME - i.e. you may have to do this manually.
>Alan
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>