K
KD
Access 2000 SP-3
SQL Server 2000, SP unknown
I bought the book when I created my first SQL Server application in 2001,
and it saved me many times over. I've been using code to populate combo
boxes in disconnected adp's. Recently, this started failing, and the only
difference I can see is that the code is failing with parameters that are
longer than just a few characters.
For example, this works fine:
Row Source Type: UseLocalFile
Row Source: procABC 0, -2
So does this:
Row Source: procDEF Batches, CodeNum
This one fails:
Row Source: procGHI 00078660003296SS3365000, 0
The failure occurs (when I "Break on all Errors") in module modLocalStorage,
procedure HandleLocalStorage, at
rst.Open Source:=ctl.RowSource
The error I get is:
Run-time error '-2147217900 (80040e14)':
Line 1: Incorrect syntax near 'SS3365000'
Note the truncated parameter (from '00078660003296SS3365000' to 'SS3365000')
However, when I look up the value of ctl.RowSource in the immediate window,
it contains the correct non-truncated parameter.
The stored procedure does work when I test it from query analyzer. It's a
simple "Select" procedure, accepting two parameters.
This is driving me nuts. I simply cannot figure out why this error is
happening. I searched the MSKB and newsgroups hi & lo, and although there
are many references to "Line 1: Incorrect syntax", none of them appear to
apply.
Please, someone point me in the right direction.
Sincerely,
Klaus
SQL Server 2000, SP unknown
I bought the book when I created my first SQL Server application in 2001,
and it saved me many times over. I've been using code to populate combo
boxes in disconnected adp's. Recently, this started failing, and the only
difference I can see is that the code is failing with parameters that are
longer than just a few characters.
For example, this works fine:
Row Source Type: UseLocalFile
Row Source: procABC 0, -2
So does this:
Row Source: procDEF Batches, CodeNum
This one fails:
Row Source: procGHI 00078660003296SS3365000, 0
The failure occurs (when I "Break on all Errors") in module modLocalStorage,
procedure HandleLocalStorage, at
rst.Open Source:=ctl.RowSource
The error I get is:
Run-time error '-2147217900 (80040e14)':
Line 1: Incorrect syntax near 'SS3365000'
Note the truncated parameter (from '00078660003296SS3365000' to 'SS3365000')
However, when I look up the value of ctl.RowSource in the immediate window,
it contains the correct non-truncated parameter.
The stored procedure does work when I test it from query analyzer. It's a
simple "Select" procedure, accepting two parameters.
This is driving me nuts. I simply cannot figure out why this error is
happening. I searched the MSKB and newsgroups hi & lo, and although there
are many references to "Line 1: Incorrect syntax", none of them appear to
apply.
Please, someone point me in the right direction.
Sincerely,
Klaus