logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

AW: VB6 Problem: msg#00005

db.mysql.odbc

Subject: AW: VB6 Problem

Well, it's fine to hear it works.

Lets see what the 3705 can bee. According to the MSDN it means:

"Operation is not allowed when the object is open. An object that is open
cannot be opened. Fields cannot be appended to an open Recordset."

That means, if you have a recordset "rs", it is open, and you try to open it
again without closing it before. Same problem appear if rs is open and you
try to release rs with "set rs = nothing" (while it is open) ... This will
also end in this error. So, it means you are trying to do anything with an
OPEN recordset, which is only allowed to a closed one.

The question which still stay is: Why/how did it work before?

Is it possible that you have error fetching in your module? See the
following example:

On Error GoTo HANDLE_ERROR

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim varZeile As Integer

Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.CursorLocation = adUseClient
conn.ConnectionString = varConnectionString
conn.Open


varSQLCommand = "select zonenname from tzoneneinteilungen where
zonenname is not null group by zonenname"
rs.Open varSQLCommand, conn, adOpenStatic, adLockOptimistic,
adCmdText
If rs.RecordCount <> 0 Then
rs.MoveFirst
Do Until rs.EOF

' Here we are in a loop
x
x
x
x
' Here occours ANY error ... So the procedure jumps to
"HANDLE_ERROR"
x
x
x

rs.MoveNext
Loop

End If
rs.Close
conn.Close

Set rs = Nothing
Set conn = Nothing



Exit Sub
Hadle_error:
If Err <> 94 Then

varSQLCommand = "select * from terror_table where 1=0"
rs.Open varSQLCommand, conn, adOpenStatic, adLockOptimistic,
adCmdText
If rs.RecordCount <> 0 Then
' *** bla bla bla
endif

End If
Resume Next


You can see, i am openening "RS" here to get some data from a table. Because
i am wating for more then 1 record i will run into a loop to do something
with the data. In the middle of the loop i will run into ANY error (doesnt
metter which one). I got a error procedure which will put the errors into a
table so that i can trace it. BUT: in the error procedure (handle_error:) I
am trying to open the recordset "RS" which is allready open from the first
part of the module. This will end in a 3705.

What does it mean for you? It means that it may happen that the error is
basicly another one, but because the error handler is generating a newer
one, you will see this one.

Are you sure you got an actual copy of the database? (all fields in the
tables)?

What else can you try? Did you to set the odbc tracing on? This may help you
see where the error comes from. It will rapidly slow down the application
... But it will maybe help you see where the error happens.

Michael



-----Ursprüngliche Nachricht-----
Von: Sawan Gupta [mailto:sawangupta.it@xxxxxxxxx]
Gesendet: Freitag, 06. Jänner 2006 11:19
An: myodbc@xxxxxxxxxxxxxxx
Betreff: Re: VB6 Problem


Thanx a lot, it worked. Could you please suggest something for the error
3705.

Thanx again.


Sawan


On 1/5/06, Michael Haunzwickl / SYN <michael.haunzwickl@xxxxxx> wrote:
> Hi there,
>
> Sawan, let me give you a opinion about the 383 error message:
>
> If you have a combobox, style 2 - dropdown list, and you try to set
> this list to a value which is not included to the list then you will
> receive a 383. For example: You got a dropdown combo style 2 -
> dropdown list, and you fill it with dates (e.g. 01.01.2006,
> 02.01.2006, 03.01.2006, 04.01.2006) and later in the code you try to
> set it to a 05.01.2006 you will receive this message, because
> 05.01.2006 is not a value of the list.
>
> So in your case, the 383 may happen because you have to resetup your
> computer. In the old computer you got maybe special settings for the
> date format? Now you didnt set this values again (because you forgot
> about it), but the vb6 code is waiting for this format to select
> something from the combo box. Maybe you have system date format
> "dd/m/yyyy" but you fill the combobox like shown above (dd.mm.yyyy).
> When you now try to set a date it will fail.
>
> This is about where the 383 comes from, and I personaly think that the
> 383 has nothing to do with the 3705 which comes a bit later. I think
> you got 2 problems there.
>
> Hope this helps a bit
> Michael
>
>
> -----Ursprüngliche Nachricht-----
> Von: Sawan Gupta [mailto:sawangupta.it@xxxxxxxxx]
> Gesendet: Donnerstag, 05. Jänner 2006 03:07
> An: myodbc@xxxxxxxxxxxxxxx
> Betreff: Re: VB6 Problem
>
>
> I dont have the source code, My Hard disk got crashed. I am just left
> with the executable which use to run fine earlier but now doesn't.
>
> Regards,
>
> Sawan Gupta
>
>
> On 1/5/06, Carlos Olivas Barba <carlosolivas@xxxxxxxxxxxxxxxx> wrote:
> > Can you send the piece of code when the error occurs?
> >
> >
> >
> > Saludos,
> >
> >
> >
> > Carlos Olivas Barba
> >
> > Gerente de sistemas
> >
> > Mayan Sea Garden
> >
> > Mazatlán, Sinaloa.
> >
> >
> > -----Mensaje original-----
> > De: Sawan Gupta [mailto:sawangupta.it@xxxxxxxxx]
> > Enviado el: Viernes, 30 de Diciembre de 2005 06:55 p.m.
> > Para: myodbc@xxxxxxxxxxxxxxx
> > Asunto: RE: VB6 Problem
> >
> > Yes I have the MDAC 2.8 installed. I also ran WIndows Update and
> > system is fully updated with all patches.
> >
> > What else should I check?
> >
> > Thanks a lot.
> >
> > Warm Regards,
> >
> >
> >
> > On 12/28/05, Luís Damas <samad@xxxxxxxxxxxxxxx> wrote:
> > > Check if you have the last MDAC instaled (2.8)
> > > www.microsoft.com/data
> > >
> > >
> > > Regards
> > > Luis Damas
> > > ----- Original Message -----
> > > From: "Sawan Gupta" <sawangupta.it@xxxxxxxxx>
> > > To: <myodbc@xxxxxxxxxxxxxxx>
> > > Sent: Wednesday, December 28, 2005 12:23 PM
> > > Subject: VB6 Problem
> > >
> > >
> > > I had developed a VB6 application on my Win XP SP2 machine. Later
> > > my HDD crashed and I have lost the source code.
> > >
> > >
> > > I dont remember which version of MyODBC I was using. My mysql
> > > version was mysql-4.0.18-win.
> > >
> > > My application now gives me the following errors on windows xp sp2
> > >
> > > run time error 383
> > > text property is read only
> > >
> > > Run time error '3705'
> > > operation is not allowed when the object is open.
> > >
> > > How do I eliminate these errors. I tried various older version of
> > > MyODBC too but didnt got any sucess.
> > >
> > > Thanks a lot.
>
>

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:
http://lists.mysql.com/myodbc?unsub=michael.haunzwickl@xxxxxx


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo