Article View: pl.comp.lang.vbasic
Article #92451Re: VB6 i obiekt ADODB.Connection
From: Artur S.
Date: Sun, 30 Oct 2005 21:20
Date: Sun, 30 Oct 2005 21:20
28 lines
1610 bytes
1610 bytes
Karlo napisał(a): > Witam > > Mam pytanko. W jaki sposób stwierdzić, czy baza danych została otwarta? > Próbuję to zrobić w następujący sposób: > > Public Function CzyBazaOtwarta() As Boolean > If Len(BazaDanych.ConnectionString) <> 0 Then > CzyBazaOtwarta = True > Else > CzyBazaOtwarta = False > End If > End Function > > Wszystko jest ok, jeżeli została wcześniej zainicjowana zmienna > BazaDanych. Jeżeli nie, wówczas się wysypuje z mało przyjemnym > komunikatem "Object variable or With block variable not set". > Jak to ominąć? > > Z góry dziękuję za odpowiedzi > > Karlo Co to za obiekt 'BazaDanych' ? Sprawdź : Is Nothing Pozdrawiam Artur S.
Technical Details
Message-ID:
<dk3d0g$jkg$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<djtc8i$8a9$1@nemesis.news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "Artur S." <arturstan@poczta_nie_spamuj.onet.pl> Newsgroups: pl.comp.lang.vbasic Subject: Re: VB6 i obiekt ADODB.Connection Date: Sun, 30 Oct 2005 22:20:17 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 28 Message-ID: <dk3d0g$jkg$1@nemesis.news.tpi.pl> References: <djtc8i$8a9$1@nemesis.news.tpi.pl> NNTP-Posting-Host: 212.160.91.35 Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1130706768 20112 212.160.91.35 (30 Oct 2005 21:12:48 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sun, 30 Oct 2005 21:12:48 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: pl, en-us, en In-Reply-To: <djtc8i$8a9$1@nemesis.news.tpi.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit