Forum Discussion

wynfranc100's avatar
wynfranc100
Occasional Contributor
4 years ago

Update the Project's temp variable of type DB Table

Hi.

 

Is there a way to update the DB table type field (in the Project Variable Temporary variable section) with its connection string information using a script? 

 

{Query: "whatever cmd'"; connection string: "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=myId;Initial Catalog=myDB;Data Source=localhost"}

 

I'm getting type mismatch if I assign that value to Project.Variables.MyTable which is of type Data Table (initial value is {No Table})

 

Thanks

 

 

 

    • ebarbera's avatar
      ebarbera
      Staff

      Hi wynfranc100 - 

       

      Have you considered writing a short script to work with your DB table instead of using a temp Project Variable?

       

      Also - the type of variable should be a string I believe (if you are looking to use in place of the connection string) but if you could provide an image/script it would be helpful to better understand your issue. 

      Thanks,

      Emma

       

       

       

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Thanks Emma!

         

        Hi wynfranc100! Are you still facing this issue? Please provide the details Emma requires to keep investigating.

        In case you found a solution, feel free to share it with other community members!