🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #2210

*** Recordset Open o Close ??? ***

#2210
From: Saimon
Date: Wed, 30 Jul 2003 09:49
32 lines
1929 bytes
Come mai a volte il programma mi da errore perch� l'oggetto � aperto e a
volte l'oggetto � chiuso ???

Non ho riportato la funzione di apertura connessione al DB...

Dim cn as New ADODB.Connection
Dim rs as New ADODB.Recordset

On error resume next

Sql = "SELECT * FROM calendario"
  rs.open sql,cn,adOpenStatic, adLockOptimistic
  If Err.Number <> 0 Then
    MsgBox Err.Description
    Exit Function
  End If

If Not rs.EOF Then
    Sql = "DELETE * from CALENDARIO"
    rs.open sql,cn,adOpenStatic, adLockOptimistic
    If Err.Number <> 0 Then
      MsgBox Err.Description
      Exit Function
    End If
  End If

  Sql = "SELECT * FROM calendario"
  rs.Open Sql, cn, adOpenStatic, adLockOptimistic
  If Err.Number <> 0 Then
    MsgBox Err.Description
    Exit Function
  End If
Technical Details
Message-ID: <bg84c7$v3p$1@newsreader.mailgate.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!newsreader.mailgate.org!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f94ee,da326d5251d5c643,start
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2003-07-30 02:50:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!newsreader.mailgate.org!not-for-mail
From: "Saimon" <saimon181072@yahoo.it>
Newsgroups: free.it.visual-basic
Subject: *** Recordset Open o Close ??? ***
Date: Wed, 30 Jul 2003 11:49:53 +0200
Organization: Mailgate.ORG Server - http://www.Mailgate.ORG
Lines: 34
Sender: saimon181072@yahoo.it
Message-ID: <bg84c7$v3p$1@newsreader.mailgate.org>
NNTP-Posting-Host: host214-218.pool8175.interbusiness.it
X-Trace: newsreader.mailgate.org 1059558600 31865 81.75.218.214 (30 Jul 2003 09:50:00 GMT)
X-Complaints-To: abuse@mailgate.org
NNTP-Posting-Date: Wed, 30 Jul 2003 09:50:00 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165