LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming, microsoft.public.access.queries
external usenet poster
 
Posts: 74
Default Switch() causes strange ADO result

Can anyone explain this?

Sub test()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With rs
..ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Tempo\New_Jet_DB.mdb"
..Source = "SELECT Switch(1=1, MyIntegerCol, 0=1, NULL) FROM MyTable"
..Open
MsgBox .Fields(0).Value
MsgBox .Fields(0).Type = adVarBinary
End With
End Sub

Test table:

CREATE TABLE MyTable (
MyIntegerCol INTEGER NOT NULL
)
;
INSERT INTO MyTable VALUES (2)
;

Many thanks,
Jamie.

--

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why this strange result with vlookup Amin Excel Worksheet Functions 3 April 23rd 10 12:16 AM
SUMIF, wrong result, strange behaviour Werner Rohrmoser Excel Worksheet Functions 5 April 23rd 09 05:11 PM
Pivot table strange result prufrock Excel Discussion (Misc queries) 0 February 23rd 07 04:40 PM
Strange Result using custom number format sfrancoe2 Excel Discussion (Misc queries) 0 January 10th 06 05:07 PM
Strange result in Excel 2000 ibertram Excel Discussion (Misc queries) 4 November 12th 05 01:48 PM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"