Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default problem using isnull() to check a value in ADODB.Recordset

Hello,

i found a strange behavior when trying to branch with isNull on a NULL
value returned in a recorordset.

The following query:

SQL = "select distinct (ergebnis_state.name), ergebnis.kommentar " & _
"from ergebnis_state " & _
"join ergebnis on(ergebnis.ergebnis_state_id=ergebnis_state.id) " &
_
"join ergebnis_parameter
on(ergebnis_parameter.ergebnis_id=ergebnis.id) " & _
"join default_werte
on(default_werte.id=ergebnis_parameter.parameter_i d) " & _
"join werte_kategorie
on(werte_kategorie.id=default_werte.werte_kategori e_id) " & _
"join session on(ergebnis.session_id=session.id) " & _
"join testcase on(ergebnis.testcase_id=testcase.id) " & _
"where default_werte.wert='" & swv & "' " & _
"and werte_kategorie.name='" & SW_PARAMETER & "' " & _
"and session.progress_state_id='2' " & _
"and testcase.name like '" & tc_id & "%';"

returns a recordset with two values (name, kommentar) in each row. If
i step through the code and put the mouse pointer once on
rec!kommentar

Dim rec As ADODB.Recordset
..
..
..
If IsNull(rec!kommentar) Then
aCommentVerdict.comment = ""
Else
aCommentVerdict.comment = rec!kommentar
End If

the correct expression (e.g. "no transfer possible!") is shown. If i
leave the focus of rec!kommentar with the mouse pointer an re-enter
focus on rec!kommentar it shows a empty string "" (without executing a
further step in the code!)!?
So does VBA without stepping through the code and executing the code
in non-stepping mode.
The assignment of rec!kommentar to another variable (e.g. the string
type aCommentVerdict.comment) is set to ""!?
If i assign the value without using previously isNull the assignment
works.
Is there a known problem with isNull?

regards,
Peter

Versions used:
MS Excel 2002 (10.6501.6714) SP3
MySQL ODBC
BS MS Windows 2000 Professional
Version 5.0.2195 Service Pack 4 Build 2195
MySQL ODBC 3.51 Driver DSN, Version 3.5.07
Reply
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
Delete ADODB Recordset Jim Thomlinson[_3_] Excel Programming 2 January 12th 05 04:16 AM
ADODB Recordset problem Stefen Percoco Excel Programming 2 July 26th 04 06:31 PM
0 with ADODB Recordset Stefen Percoco Excel Programming 1 July 8th 04 09:54 PM
adodb.recordset with excel nate axtell Excel Programming 14 June 11th 04 01:32 PM
ADODB Recordset Seth[_3_] Excel Programming 0 August 5th 03 02:15 PM


All times are GMT +1. The time now is 06:59 AM.

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

About Us

"It's about Microsoft Excel"