> Sorry, I didn't reply-all.
> 
> I use Nucleus ODBC driver for Sand Analytic Server.
> I agree that the problem may be in the driver, but
> SQLExecute would finished successful if I don't stop it.
> it uses the same statement handler imp_sth->hstmt.
> I commented checking for active statement in dbdimp.c and 
> execute this code. The error I got is '[iODBC][Driver 
> Manager]Function sequence error' I checked odbc driver trace 
> and didn't find call SQLCancel after SQLExecute. The trace now is:
> 
> Thu Dec  5 14:27:53 2002
> Returning from SQLPrepare()
> Retcode = SQL_SUCCESS
> 
> Thu Dec  5 14:27:53 2002
> Entering SQLExecute()
> hstmt: 4049b018
> 
> 
> Thu Dec  5 14:27:57 2002
> Entering SQLGetDiagRec()
> HandleType: SQL_HANDLE_STMT
> Handle: 4049b018
> RecNumber: 1
> Sqlstate: 1fffcf00
> NativeErrorPtr: 1fffcef0
> Message: 1fffcf50
> BufferLength: 511
> TextLengthPtr: 1fffcef8
> 
> 
> Thu Dec  5 14:27:57 2002
> Returning from SQLGetDiagRec()
> Retcode = SQL_NO_DATA_FOUND

Hmm -- is this a valid query?  It could be the specific query, since no
data is found, is ending itself.

> 
> Is there a way to set a trace of Driver Manager to see
> what it goes to the odbc driver exactly?


I'm not sure about iODBC, but you can with UnixODBC.  You can try to
switch to that.


> 
> Vassiliy
> 
> Jeff Urlwin wrote:
> 
> > >
> > > It works for me on Windows as well. The problem occurred only on 
> > > unix. ODBC Driver doesn't read data to the buffer yet 
> according the 
> > > driver trace:
> > >
> > > Thu Dec  5 10:07:43 2002
> > > Entering SQLPrepare()
> > > hstmt: 4049b018
> > > StatementText: select count(*) from amount where amount > 1200
> > > TextLength: 47
> > >
> > > Thu Dec  5 10:07:43 2002
> > > Returning from SQLPrepare()
> > > Retcode = SQL_SUCCESS
> > >
> > > Thu Dec  5 10:07:43 2002
> > > Entering SQLExecute()
> > > hstmt: 4049b018
> > >
> > > Execute doesn't finished yet. Also I checked on the 
> server, query is 
> > > in 'execute' mode. Any ideas?
> >
> > Which driver are you using?  The iODBC is the driver manager.  What 
> > type of database are you trying to use?
> >
> > (I'm betting on a driver bug, BTW)
> >
> > Regards
> >
> > Jeff
> >
> > >
> > > Vassiliy
> > >
> > >
> > > Jeff Urlwin wrote:
> > >
> > > > >
> > > > > Hello everybody.
> > > > >
> > > > > I call SQLCancel function to cancel my query and got an error:
> > > > > DBD: no statement executing err=-1.
> > > > > It looks like statement is not defined in 
> DBIc_ACTIVE(imp_sth). 
> > > > > I run it on osf1 unix 4, DBI 1.31, DBD::ODBC 0.45_18. I use
> > > SDK iODBC
> > > > > driver manager version 3.
> > > >
> > > > I'm not getting that error on Windows, using DBI 1.30.  
> Which ODBC 
> > > > driver are you using?  It may be that the driver isn't
> > > returning any
> > > > rows for the query or only returning one row since it's 
> a count() 
> > > > query and the "driver" has already read that row into a 
> buffer and 
> > > > "finished" the execution.  Can you try it with a query 
> that will 
> > > > return multiple rows (> than the number of rows being buffered)?
> > > >
> > > > Jeff
> > > >
> > > > >
> > > > > The trace is following:
> > > > >
> > > > >     -> prepare for DBD::ODBC::db 
> > > > > (DBI::db=HASH(0x140087e68)~0x140087dd8
> > > > > 'select count(*) from amount where amount > 1200'
> > > HASH(0x1402f6b60))
> > > > >     New DBI::st (for DBD::ODBC::st, 
> > > > > parent=DBI::db=HASH(0x140087dd8),
> > > > > id=)
> > > > >
> > > > > dbih_setup_handle(DBI::st=HASH(0x140087e58)=>DBI::st=HASH(0x14
> > > > > 0089508),
> > > > > DBD::ODBC::st, 140087e78, Null!)
> > > > >     dbih_make_com(DBI::db=HASH(0x140087dd8),
> > > DBD::ODBC::st, 368) thr#0
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), Err,
> > > > > DBI::db=HASH(0x140087dd8)) SCALAR(0x14022f240) 
> (already defined)
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), State,
> > > > > DBI::db=HASH(0x140087dd8)) SCALAR(0x14022f1e0) 
> (already defined)
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), Errstr,
> > > > > DBI::db=HASH(0x140087dd8)) SCALAR(0x14022f210) 
> (already defined)
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), Debug,
> > > > > DBI::db=HASH(0x140087dd8)) 0 (already defined)
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), 
> > > > > FetchHashKeyName,
> > > > > DBI::db=HASH(0x140087dd8)) 'NAME' (already defined)
> > > > >     dbih_setup_attrib(DBI::st=HASH(0x140089508), HandleError,
> > > > > DBI::db=HASH(0x140087dd8)) undef (not defined)
> > > > >     <- prepare= DBI::st=HASH(0x140087e58) at psql_m.pl
> > > line 1036 via
> > > > > psql_m.pl line 865
> > > > >     -> execute for DBD::ODBC::st
> > > > > (DBI::st=HASH(0x140087e58)~0x140089508)
> > > > >
> > > > > 1   -> cancel for DBD::ODBC::st
> > > > > (DBI::st=HASH(0x140087e58)~0x140089508)
> > > > >     !! ERROR: -1 '(DBD: no statement executing err=-1)'
> > > > > 1   <- cancel= undef at psql_m.pl line 3540 via psql_m.pl
> > > line 1060
> > > > >     -> $DBI::errstr (&) FETCH from lasth=HASH
> > > > >     >> DBD::ODBC::st::errstr
> > > > >     <- $DBI::errstr= '(DBD: no statement executing err=-1)'
> > > > >     !! ERROR: -1 '(DBD: st_execute/SQLExecute err=-1)'
> > > > >
> > > > > Thanks in advance,
> > > > > Vassiliy
> > > > >
> > > > >
> > > > >
> > >
> 
> 


Reply via email to