This is the code:
Public Sub Graba_Recibido(texto As String)
277 On Error GoTo Manejo_Error
278 Dim db As Database
279 Dim rec As DAO.Recordset
281 texto = Mid(texto, 2, 2) & Mid(texto, 7, Len(texto) - 7)
282 texto = Mid(texto, 1, Len(texto) - 1)
284 Set db = CurrentDb
285 Set rec = db.OpenRecordset("select * from BALANZA_RECEPCION where
1=0", dbOpenDynaset, dbSeeChanges, dbOptimistic) ' abro la tabla
286 rec.AddNew ' Agrego uno nuevo
287 rec!rc_data = texto
288 rec!rc_fecha = CDbl(Date)
289 rec!rc_procesado = "N"
290 rec.Update ' Actualizo
informaci�n
291 rec.Close ' cierro cursor
292 Set db = Nothing
296 Exit Sub
297 Manejo_Error:
298 Set db = Nothing
299 Procesa_Error "DibalTimer - Funciones Locales - Graba_Recibido",
True
End Sub
And this is the error report i got
-----*-----*-----*-----*-----*-----*-----*-----*-----*-----*-----*-----*
----
-*
Fecha: 02/03/2005 Hora: 11:43:22 AM
Error en DibalTimer - Funciones Locales - Graba_Recibido:
Error #3151 (L�nea: 285) (Source: DAO.Database) ODBC--connection to
'{MySQL ODBC 3.51 Driver}dellserver' failed.
Usuario Conectado: Administrator
In MSDN the error 3151 is:
ODBC - connection to <name> failed. (Error 3151)
The ODBC connection to the specified ODBC database or table could not be
made. If the ODBC database is accessed via a network connection, make
sure the network is available, and then try the operation again.
It's failing in the OpenRecordset, but all the tables are linked, and if
we open the table, we can see the data.
The problem not allways occours
Osvaldo Sommer
-----Original Message-----
From: Daniel Kasak [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 8:26 PM
To: Osvaldo Sommer; [email protected]
Subject: Re: Problem with a repeated select from MS Access
Osvaldo Sommer wrote:
>Daniel:
>
> The program is an interfase for a weigth system in a Retail
>environment.
>The program query the weigth system for new data every 200 miliseconds,
>if new data is received it has to be stored in the database. The table
>has automatic correlative, the data in ascii, the date and time and a
>Timestamp.
>
>When we run the program it start well and the data gets processed and
>stored. But after a while we start getting error 3151 ODBC can't
connect
>to mysql server.
>
>We have MySql 4.0.12 and odbc 3.51.6, all the tables are linked to the
>msaccess program.
>
>What else you need of info?
>
>Osvaldo Sommer
>
>
How about some code examples?
How are you inserting the data?
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.0 - Release Date: 3/8/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.0 - Release Date: 3/8/2005
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]