SQL REPLACE function does not work thru ADO/DAO/OLE layer
From: rmsterling (rmsterling_at_avaya.com)
Date: 11/12/04
- Next message: Pharo: "copying the table structure"
- Previous message: wiz: "Can Forms / Controls be controlled remotely?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Nov 2004 02:39:03 -0800
Windows 2000 Professional installed with Service Pack 4.
MDAC 2.8 installed.
Visual Basic 6.0 installed with Service Pack 5.
SQL REPLACE function executes fine in a Access 2003 Query window with an
Access 2000 database.
Run the same query in a VB6 SP5 program causes an error through the DAO/OLE
layer.
References
Microsoft DAO 3.6
Microsoft ADO 2.8
' Connection Defined & Setup
Global adoConnection As New ADODB.Connection
adoConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
sDBLocation & "\" & DB_FILENAME & ";"
' Query Defined & Executed
Dim sSQL As String
sSQL = "UPDATE Question SET sScriptLine=REPLACE(sScriptLine,'LINE:11 ','L ')
WHERE lRunNo = 45;"
adoConnection.Execute sSQL
' Error produced from running query
ADO/DAO/OLE Error
Number : -2147217900 (80040E14 Hex)
Desc : Undefined function 'REPLACE' in expression.
Native : -530123806
Source : Microsoft JET Database Engine
SQL State : 3085
Can anyone tell me what I need to do to get this to work?
-- ---------------------------- Regards, Richard Sterling Senior Software Engineer Tel : +44 (0)1707 392200 ext 4815 Avaya ECS Ltd, United Kingdom mailto:rmsterling@avaya.com
- Next message: Pharo: "copying the table structure"
- Previous message: wiz: "Can Forms / Controls be controlled remotely?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|