New connection without reason
am 03.12.2007 13:01:22 von Mauricio BrunsHi,
I'm using myodbc 3.51.22, mysql 4.1.20 and Clarion. I don't know why,=20
but sometimes, without reason it (myodbc, mysql or clarion) creates a=20
new connection between two queries that couldn't be separate. For=20
example I do "INSERT INTO ...." (in a autoinc table) and after I do=20
"SELECT last_insert_id()", but each query was executed in their own=20
connection, than the second query return 0. Do you think that it could=20
be myodbc error?
Here is some part of mysql log:
C:\Arquivos de programas\MySQL\MySQL Server 4.1\bin\mysqld-nt, Version:=20
4.1.22-community-nt-log. started with:
TCP Port: 3306, Named Pipe: MySQL
Time Id Command Argument
071129 14:52:17 1 Connect root@192.168.1.234 on Test
1 Query SET SQL_AUTO_IS_NULL =3D 0
1 Query SELECT @@tx_isolation
1 Query SET SESSION TRANSACTION ISOLATION LEVEL=20
REPEATABLE READ
1 Query SELECT * FROM Empresa WHERE 0 =3D 1
1 Query SELECT=20
CodEmpresa,NomeEmpresa,CodSistema,NrUsuarios,DriverBD,AliqPi s,AliqCofins,=
AliqCS,AliqIRF,VlrMinimoIRF,AliqIRLucro,PrazoIRJ,PrazoICMS,P razoIPI,Prazo=
PIS,PrazoCofins,PrazoCS,PrazoFP,PrazoFGTS,PrazoINSS,VlrMinim oICMSDifer,Co=
dFilialPadrao,SeImpressoraFilial,CodClienteINSS,CodClienteIR F,CodClienteP=
CC,CodClienteISS,MetPrevisaoFluxo=20
FROM Empresa WHERE 0 =3D 1
..
1 Query INSERT INTO NotaPed=20
(NrCadDoc,CodEmpresa,CodFilial,TipoDocto,NrNota,SerieNF,CodC liente,NrPedi=
do,NrAtendimento)=20
VALUES (117286,1,5,1,15188,'3',23574,6344,214)
1 Query Begin
1 Query INSERT INTO DocIte=20
(NrCadDoc,CodEmpresa,CodFilial,TipoDocto,NrNota,SerieNF,CodC liente,NrSeqI=
te,CodProduto,CodVariante,CodTamanho,CodQualidade,UnidMedida ,QtdePecas,Qt=
deMovto,PesoLiquido,PesoBruto,PrecoUnitario,PrecoUnitarioLiq ,TipoOperFat,=
CodNatFiscal,CodProced,CodICMS,CodIPI,IncidePIS,IncideCofins ,IncideCSLL,A=
liqICMS,CodClaFis,TaxaIPI,VlrProduto,VlrSeguro,VlrDespAces,V lrIpiNContrib=
,VlrBonif,VlrBonif2,VlrFrete,VlrFreteCalc,VlrOutDespesas,Vlr ISS,VlrIRF,Vl=
rFunRural,VlrICMS,VlrICMSSubs,VlrICMSDifer,VlrIPI,VlrIPIDesp ,VlrPIS,VlrCo=
fins,VlrCSLL,VlrPCC,VlrINSS,VlrTaxaImportacao,VlrImpostosCob r,VlrServicoP=
ago,VlrContabil,VlrComissao,VlrComissaoAdic,VlrEncFinanc,Cod Colecao,CodLo=
cal,CodLocalDest,CodCusto,CodAplic,NrLoteProd,NrVolume,NrAte ndimento,NrPe=
dido,NrSeqPed,NrOrcam,NrSeqOrc,NrOrdem,NrSeqProd,QtdePerda,S itEstoque,Tip=
oOperEtq,CodMensNF,CodFuncionario,CodProdutoCli,DescProduto, Observ,QtdeGr=
ade1,QtdeGrade2,QtdeGrade3,QtdeGrade4,QtdeGrade5,QtdeGrade6, QtdeGrade7,Qt=
deGrade8,QtdeGrade9,QtdeGrade10,QtdeGrade11,QtdeGrade12)=20
VALUES=20
(117286,1,5,1,15188,'3',23574,1,'20120174','','','','PC',0,1 .000 =20
,0.000 ,0.000 ,23.000000 ,23.000000 =20
,'P','510202','0','00','90','S','S','S',17.00 ,' ',0.00 =20
,23.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 =
,0.00 ,0.00 ,0.00 ,0.00 ,3.91 ,0.00 ,0.00 ,0.00 =20
,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 =20
,0.00 ,0.00 ,1.15 ,0.00 ,0.00 =20
,8,0,0,0,0,'',0,214,6344,1,0,0,0,0,0.000 =20
,'N','N',0,0,'','T-SHIRT','',0,0,0,0,0,0,0,0,0,0,0,0)
131 Connect root@192.168.1.234 on Test
131 Query SET SQL_AUTO_IS_NULL =3D 0
131 Query SET SESSION TRANSACTION ISOLATION LEVEL=20
REPEATABLE READ
131 Query Select last_insert_id()
1 Query Commit
..
Thanks in advance,
Mauricio Bruns
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg