Jump to content

Recommended Posts

Posted

I have a script that opens my database and collects infromation, but I havent been able to figure out how to send that information. Here is the code I have so far:

___________________________________________________________________

Local $oRS

Local $oConn

Local $oProviderGroupID

$oConn = ObjCreate ("ADODB.Connection")

$oRS = ObjCreate ("ADODB.Recordset")

$oConn.Open ("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=user;Data Source=datasource")

$oProviderGroupID = ObjName ("ProviderGroupID")

$oRS.Open("SELECT DMisProviderGroup.ProviderGroupID FROM DMisProviderGroup WHERE DMisProviderGroup.Active= 'Y' AND LEFT(DMisProviderGroup.ProviderGroupID,3)IN ('LC.','MD.','UA.') AND DMisProviderGroup.ProviderGroupID NOT IN ('LC.PSYCH','LC.PSYKLR','LC.PSYMAD','LC.PSYMID','LC.PSYNEE','LC.PSYOSH')AND SUBSTRING(DMisProviderGroup.ProviderGroupID,4,3) <> 'LAB' ", $oConn, 1, 3)

WinWaitActive ("MIS")

For $iIndex = 1 To $oRS.RecordCount

SEND ($oProviderGroupID)

SEND ("{ENTER}")

$oRS.MoveNext

Next

$oConn.Close

$oConn = 0

___________________________________________________________________

I know I am getting records, I can do a record count and it returns a value of 93 and that is correct.

How do I print each record?

Thanks!!!

Posted

I am using this scrip to help an admin assistant in filling out a form. Right now we have 93 different clinics and they change all the time. This script will be grabbing the clinics from an up-to-date database, then filling in an input box on the form.

I changed the line as was suggested; however I received the following error:

Line 27 (File"C"\filelocation\script.AU3)

SEND ($oRS.Fields(1).value)

SEND ($oRS.Fields(1)^ERROR

Error: The requested action with this object has failed.

Thanks for the help!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...