1

Is there any way to pass a C# object( in this case I'm using ADODB.Recordset) to vbscript? Or is their a way to call a vbscript function from C# and pass in this object?

E.x. In C# I have a object called ADODB.Connection rs is there a way to call my vbscript function DisplayDrillThrough(rs) like so?

Hillboy
  • 472
  • 6
  • 19
  • VBScript runs on the client - it has to open it's own connection/recordsets. And, really? Classic ADO in C#? – Yuriy Galanter Sep 10 '14 at 15:36
  • Why would you want to do this? What problem are you trying to solve? C# can probably do it all :) – Jobbo Sep 10 '14 at 15:36
  • Security in VbScript is garbage. Right now I have it working entirely in VBScript but trying to make it more secure is not working at all since it pretty much doesn't exist and the only way I can actually make secure encrypted connections is through C#. Essentially I'm doing contract work and they're using Microsofts Office Web Components which I can only change/access with client side code( it won't let me change attributes server side) – Hillboy Sep 10 '14 at 15:43
  • 1
    Can you build and use a dll? I have no idea if this will work in vbscript, but it seems ok in vba, which is not so different. – Fionnuala Sep 10 '14 at 16:02
  • If you need to access server-side data directly from the client - the correct way is to make AJAX (xmlhttprequest) call to server-side code. And let server-side handle all DB connections – Yuriy Galanter Sep 10 '14 at 16:07
  • @Fionnuala This is what I'm trying to do and seems like the best option without changing the entire code that involves OWC. Although I have made recommendations in changing the report system as Microsoft's OWC is not being supported past 2017. – Hillboy Sep 10 '14 at 16:44

0 Answers0