titleist0813
Programmer
I have been using the standard Open file for input method with a do while not eof() loop statment to automate some processing. I have been outputting info from access to a .csv file to do this. It would be a nice time saver if I could instead, link directly to the ms access database. I can succesfully link to the database in attachmate, but I have no idea where to go from there...
The code that I have been using is: (don't make fun of me too bad, I am self taught)
dim assoc as string
dim rfile as string
dim wfile as string
rfile = "C:\Documents and Settings\e04960\Desktop\Assoc.csv"
wfile = "c:\documents and settings\e04960\desktop\AssocStatus.csv"
close #1
Close #2
Open rfile For Input As #1
Open wfile for output as #2
' Loop until the end of file is reached.
Do While Not EOF(1)
dim status as string
dim test as string
dim level as string
dim cntrct_state as string
dim regflex as string
dim advflex as string
status = ""
' Read data into variables.
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Input #1, assoc
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
sess0.screen.sendkeys assoc
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
sess0.screen.sendkeys "<enter><enter>"
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
status = sess0.screen.getstring (09,19,01)
level = sess0.screen.getstring (04,09,33)
cntrct_state = sess0.screen.getstring (16,48,02)
regflex = sess0.screen.getstring (25,19,10)
advflex = sess0.screen.getstring (26,19,10)
print #2, assoc & ",", status & ",", level & ",",cntrct_state & ",",regflex & ",",advflex
loop
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
close #1
close #2
I would simply like to replace the open for input file with a statement to read from ms access
Any ideas would be greatly appreciated!!
The code that I have been using is: (don't make fun of me too bad, I am self taught)
dim assoc as string
dim rfile as string
dim wfile as string
rfile = "C:\Documents and Settings\e04960\Desktop\Assoc.csv"
wfile = "c:\documents and settings\e04960\desktop\AssocStatus.csv"
close #1
Close #2
Open rfile For Input As #1
Open wfile for output as #2
' Loop until the end of file is reached.
Do While Not EOF(1)
dim status as string
dim test as string
dim level as string
dim cntrct_state as string
dim regflex as string
dim advflex as string
status = ""
' Read data into variables.
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Input #1, assoc
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
sess0.screen.sendkeys assoc
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
sess0.screen.sendkeys "<enter><enter>"
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
status = sess0.screen.getstring (09,19,01)
level = sess0.screen.getstring (04,09,33)
cntrct_state = sess0.screen.getstring (16,48,02)
regflex = sess0.screen.getstring (25,19,10)
advflex = sess0.screen.getstring (26,19,10)
print #2, assoc & ",", status & ",", level & ",",cntrct_state & ",",regflex & ",",advflex
loop
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
close #1
close #2
I would simply like to replace the open for input file with a statement to read from ms access
Any ideas would be greatly appreciated!!