Hi All
In reference to the following thread :
http://www.access-programmers.co.uk/forums/archive/index.php/t-91354.html
I have managed to stumble through the "Recordset method" and am now able to insert a string into a table
, the only problem I have is there is too much data so I assume it's not inserting each line as a row and trying to put it all into one field
Here is my code its a bit messy as im a newbie but any help you can provide is most appreciated
Function test13()
Dim db As DAO.Recordset
Dim ver1 As String
Set db = CurrentDb.OpenRecordset("QDN_Tidy", dbOpenTable)
Set Sleep = CreateObject("Toolsack.Sleeper")
Set soc = CreateObject("Socket.Tcp")
'Nortel DMS Telnet session
soc.Timeout = 4000
soc.DoTelnetEmulation = True
soc.TelnetEmulation = ""
soc.Host = "xx.xx.xx.xx:23"
soc.Open
soc.WaitFor ("login:")
soc.Wait
soc.SendLine ("damcdon") & vbCrLf
soc.WaitFor ("damcdon's Password:")
soc.SendText ("xxxx") & vbCrLf
soc.WaitFor ("$")
soc.SendText ("telnet cm") & vbCrLf
soc.WaitFor ("Enter User Name")
soc.SendText ("xxxx") & vbCrLf
soc.SendLine ("xxxx") & vbCrLf
soc.Wait
soc.SendLine ("qdn 1099124285") & vbCrLf
Sleep.Sleep 2
soc.WaitFor "qdn 1099124285"
'Sleep.Sleep 2
ver1 = soc.Buffer
soc.Close
'Debug.Print ver1
'This is the code in question
db.AddNew
db.Fields("Field1").Value = ver1
db.Update
db.Close
End Function
In reference to the following thread :
http://www.access-programmers.co.uk/forums/archive/index.php/t-91354.html
I have managed to stumble through the "Recordset method" and am now able to insert a string into a table

Here is my code its a bit messy as im a newbie but any help you can provide is most appreciated
Function test13()
Dim db As DAO.Recordset
Dim ver1 As String
Set db = CurrentDb.OpenRecordset("QDN_Tidy", dbOpenTable)
Set Sleep = CreateObject("Toolsack.Sleeper")
Set soc = CreateObject("Socket.Tcp")
'Nortel DMS Telnet session
soc.Timeout = 4000
soc.DoTelnetEmulation = True
soc.TelnetEmulation = ""
soc.Host = "xx.xx.xx.xx:23"
soc.Open
soc.WaitFor ("login:")
soc.Wait
soc.SendLine ("damcdon") & vbCrLf
soc.WaitFor ("damcdon's Password:")
soc.SendText ("xxxx") & vbCrLf
soc.WaitFor ("$")
soc.SendText ("telnet cm") & vbCrLf
soc.WaitFor ("Enter User Name")
soc.SendText ("xxxx") & vbCrLf
soc.SendLine ("xxxx") & vbCrLf
soc.Wait
soc.SendLine ("qdn 1099124285") & vbCrLf
Sleep.Sleep 2
soc.WaitFor "qdn 1099124285"
'Sleep.Sleep 2
ver1 = soc.Buffer
soc.Close
'Debug.Print ver1
'This is the code in question
db.AddNew
db.Fields("Field1").Value = ver1
db.Update
db.Close
End Function