By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Invalid Character Value - Access97 Front with SQL Server 2000 Back

P: n/a
Set qdf = dbs.QueryDefs("qryUpdate_OMNIS_F_ST_Transactions") 'append
qdf.Parameters(0) = DMax("STTR_SEQ", "CopyOMNIS_F_ST_Transaction")
qdf.Execute dbSeeChanges

This gives me an error 3146 "Invalid character value for cast
specification"

I think that the field I am using the parameter on is an IDENTITY
field in the remote db and my local copy of it (which used to be and
OMNIS db, hence the name!) is using a Long.

All I want to achieve is to update my local table from the remote by
taking all records added since the last update....

Eventually there may be money for re-writing so that the SQL backend
files can be used 'live'.

I have included references to ADO2.7 but have been using DAO rather
than ADO throughout.

Any thoughts on how to get round this - quickly!
Thanks
Marian
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
a few hints (I don't have a similar environment to check exactly
what's happening):
- mixing ADO en DAO can be the problem when not explicitly specifying
database / recordset-types. Maybe just choosing the correct
library-reference (DAO?) solves the problem. (many functions have the
same name but slightly different definitions, so when ADO actually is
used for DAO-fumctions strange error-messages appear)
- 'cast' means type-conversion. It is possible sql is generated for a
ODBC-driver or OLE-DB containing cast-expressions that don't actually
work for instance because it tries to convert identity-values to
decimal not supported by Access97 .. (eventually visible by logging
generated SQL)
- the type of the parameter 0 is not correctly defined in the
query-editor or by code elsewhere.

ma****@compsols.fsbusiness.co.uk (mariantrygg) wrote in message news:<6f**************************@posting.google. com>...
Set qdf = dbs.QueryDefs("qryUpdate_OMNIS_F_ST_Transactions") 'append
qdf.Parameters(0) = DMax("STTR_SEQ", "CopyOMNIS_F_ST_Transaction")
qdf.Execute dbSeeChanges

This gives me an error 3146 "Invalid character value for cast
specification"

I think that the field I am using the parameter on is an IDENTITY
field in the remote db and my local copy of it (which used to be and
OMNIS db, hence the name!) is using a Long.

All I want to achieve is to update my local table from the remote by
taking all records added since the last update....

Eventually there may be money for re-writing so that the SQL backend
files can be used 'live'.

I have included references to ADO2.7 but have been using DAO rather
than ADO throughout.

Any thoughts on how to get round this - quickly!
Thanks
Marian

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.