borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (IBProvider Release Candidate 3 for FB and Firebird and Interbase has appeared. (ver: 3.0.0.4773)) New Topic New Poll Post Reply
AndreaVB Forum : Database : storing vb textbox in msaccess table
Poster Message
jd57
Level: Trainee

Registered: 09-08-2008
Posts: 1

icon storing vb textbox in msaccess table

Hello ! I am a newbie to VB programming.

I am trying to develope a lan interface for unidirectional scientific equipment.  Following is my code.
--
Option Explicit
Private Sub form_load()
Winsock1.Close
Winsock1.LocalPort = 2000
Winsock1.Listen
End Sub

Private Sub winsock1_connectionrequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub

Private Sub winsock1_dataarrival(ByVal bytesTotal As Long)
       Dim m_data As String
     Winsock1.GetData m_data
Text1 = Text1 & m_data
m_data = vbNullString

Dim mydb As Database
Dim myrs As dao.Recordset

Set mydb = OpenDatabase("Frogram FilesCellConnect_ Abbottcellcounter.mdb")
Set myrs = mydb.OpenRecordset("MainData")

myrs.AddNew
myrs![srl_port] = Text1
myrs.Update
myrs.Close
Text1 = ""
End Sub
--
I have following hitches
1)  I get the data as desired in text1 box in display but as soon as it gets transferred in access table it splits up in two at first ETX character in string though it does not do so on subsequent ETX character in following string & adds two recordsets 1st one with firt fragment & 2nd one with second fragment. How can I correct it?

2) How can I keep tcp port in infinite listing mode  to accept data whenever sent by equipment ?

Thanks


09-08-2008 at 05:58 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : storing vb textbox in msaccess table
Next Topic (IBProvider Release Candidate 3 for FB and Firebird and Interbase has appeared. (ver: 3.0.0.4773)) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder