Yep, that's it! I haven't got it working yet... but the syntax is good so I can continue plugging away at it until I get it.
Thanks for your help! John -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, January 18, 2010 3:34 PM To: [email protected] Subject: [talkbws] RE: .NET and datastation In c# programming, the parenthesis "()" are used when calling a method (Routine or Function). Since you are trying to access an element of a class object, you need to use square brackets "[]". So, b.D["Status"] = "Hello World" should be the correct syntax for c#. Ryan Rush OBS Development Specialist, PHS Phone: 503.215.4441 Email: [email protected] Mail: 1235 NE 47th Ave #110 Portland, OR 97213 -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, January 18, 2010 12:31 PM To: [email protected] Subject: [talkbws] RE: .NET and datastation The b.D("Status") = "Hello World " does not work for me (I'm a vb6 guy in an office full of java guys so I am meeting in the middle). I get a "Non-invocable member 'BostonWorkstation70.BostonWorkstationClass.D' cannot be used like a method." I can open the spreadsheet and get the values but I can't set the values. Is there other syntax that I can use to update datastation variables? Or am I maybe missing a reference? I also tried update/referencing flags and I get the same error as above. For example: string x = b.F("test"); is syntactically incorrect... I get the same error, "Non-invocable member 'BostonWorkstation70.BostonWorkstationClass.D' cannot be used like a method." My only reference in the project is to 'Boston WorkStation 7.0 Main DLL'. Do I possibly need another reference? John -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, January 18, 2010 2:16 PM To: [email protected] Subject: [talkbws] RE: .NET and datastation Greetings, This works no problem in .Net (I'm not a C# guy) - nothing different than what it would be in a .BWS file really (and doesn't look different from your example either. b.D.Open_("C:\Bss70\His Demo\Charge Codes.xls", BostonWorkStation70.enumFileType.ftExcel) b.D("Status") = "Hello World" MsgBox(b.D("Status")) Status is stored in a .BDS file NOT directly in the file itself - directupdate doesn't occur until the file is closed using d.Close_ - this triggers a read of the .BDS file to retrieve the values to update directly back into the spreadsheet - (unless you force the issue by calling: D.t.Appl.Save) Regards, Thom Thom C. Blackwell Product Manager Boston Software Systems (866) 653-5105 ex 807 www.bossoft.com Sign up for my weekly webinar! LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately, then delete this message and empty from your trash. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Monday, January 18, 2010 2:03 PM To: Talk Subject: [talkbws] RE: .NET and datastation I don't use datastation but I think you need to create a datastation object. Then you should be able to access all the properties and methods. HTH! -- Bill Palmer Financial Systems Analyst Mid-Columbia Medical Center 541-296-7417 >>> On 1/17/2010 at 5:02 PM, in message <[email protected]> wrote: > Yes, the configuration file does have the DirectUpdate set to true. The > problem is how do you syntactically update datastation variables from within > .NET? > > > ________________________________ > From: [email protected] [mailto:[email protected]] > Sent: Sunday, January 17, 2010 4:05 PM > To: [email protected] > Subject: [talkbws] RE: .NET and datastation > > What does the .bds look like? There's flag called DirectUpdate that should > be set to true. > > From: [email protected] [mailto:[email protected]] > Sent: Sunday, January 17, 2010 4:00 PM > To: Talk > Subject: [talkbws] .NET and datastation > > Hello All! > I am building a script in .NET (c#) referencing BostonWorkstion to easily > read through an excel spreadsheet and script some data entry through a Java > connection. My problem is this... I have not found a way to update > Datastations variables. In VBA we would use b.D("status"). But that does > not appear to be valid in .NET. I can reference the value of a datastation > variable by using b.Value("status") but that is not updatable. Am I doing > something squirrley or is there a different way to update the datastation > variables in .NET? I am guessing flags wouldn't be updateable either since > they have same syntax (b.F("status")), but I haven't tried them. > > Below is what I attempting to do ... thanks in advance for any suggestions! > > John Mulligan > ProMedica Health System > > > // Create a bws object and the load the spreadsheet into a > collection > BostonWorkStationClass b = new BostonWorkStationClass(); > string mm = ""; > string cc = ""; > > // Open the file > b.D.Open_ (fileName, > BostonWorkStation70.enumFileType.ftExcel,cc,ref mm) ; > > // Go into a loop of all the records > do > { > // Set the user properties > mckUser.ID = b.Value("ID"); > mckUser.LastName = b.Value("LastName"); > mckUser.FirstName = b.Value("FirstName"); > > b.D("MyStatus") = "READY FOR SCRIPTING"; // <<<<<<<<<< THIS WON'T > WORK > > // Move to the next row > b.D.Next_(); > > } while (b.D.EOF == false); > > > > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > > EMAIL CONFIDENTIALITY NOTICE > > This Email message, and any attachments, may contain confidential > patient health information that is legally protected. This information > is intended only for the use of the individual or entity named above. > The authorized recipient of this information is prohibited from disclosing > this information to any other party unless required to do so by law > or regulation and is required to destroy the information after its stated > need has been fulfilled. If you are not the intended recipient, you are > hereby notified that any disclosure, copying, distribution, or action > taken in reliance on the contents of this message is strictly prohibited. > > If you have received this information in error, please notify > the sender immediately by replying to this message and delete the > message from your system. > > --- > To post a message to this list, send mail to: [email protected] > > --- > To post a message to this list, send mail to: [email protected] > > You are currently subscribed as: [email protected] > > Unsubscribe in the customer center on our website: > http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > > EMAIL CONFIDENTIALITY NOTICE > > This Email message, and any attachments, may contain confidential > patient health information that is legally protected. This information > is intended only for the use of the individual or entity named above. > The authorized recipient of this information is prohibited from disclosing > this information to any other party unless required to do so by law > or regulation and is required to destroy the information after its stated > need has been fulfilled. If you are not the intended recipient, you are > hereby notified that any disclosure, copying, distribution, or action > taken in reliance on the contents of this message is strictly prohibited. > > If you have received this information in error, please notify > the sender immediately by replying to this message and delete the > message from your system. > > > --- > To post a message to this list, send mail to: [email protected] > > You are currently subscribed as: [email protected] > > Unsubscribe in the customer center on our website: > http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx > CONFIDENTIALITY NOTICE: This e-mail message (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, and is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any unauthorized review, use, disclosure, dissemination, copying, forwarding or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. If you are the intended recipient but do not wish to receive communication through this medium, please advise the sender immediately. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ EMAIL CONFIDENTIALITY NOTICE This Email message, and any attachments, may contain confidential patient health information that is legally protected. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party unless required to do so by law or regulation and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of this message is strictly prohibited. If you have received this information in error, please notify the sender immediately by replying to this message and delete the message from your system. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk .aspx This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ EMAIL CONFIDENTIALITY NOTICE This Email message, and any attachments, may contain confidential patient health information that is legally protected. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party unless required to do so by law or regulation and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or action taken in reliance on the contents of this message is strictly prohibited. If you have received this information in error, please notify the sender immediately by replying to this message and delete the message from your system. --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
