2 weeks ago
Hello everyone,
I am trying to create a table in OS with the fx rates by calling an API
while calling the API, i can get the data needed but i have this error <Type 'SqlBulkCopy' is not defined.> that's doesn't allow me to copy the data in a table in OS.
this is a part of the code, the lines in orange are the ones not working.
Solved! Go to Solution.
2 weeks ago - last edited 2 weeks ago
.net version changes with V8.
Use Microsoft.Data.SqlClient instead of System.Data.SqlClient;
2 weeks ago
Try adding
Imports System.Data.SqlClient
2 weeks ago
already did it's still not working 😕 , thanks for your answer
2 weeks ago - last edited 2 weeks ago
The error tells us that the library for SqlBulkCopy is not in scope when running your code. The runtime cannot find the SqlBulkCopy class to use it. Thats why I suggested the import.
Consider posting the complete rule in a code block so we can see what's going on.
I wrote a rule similar to yours using SqlBulkCopy and its working for me.
2 weeks ago
Actually the Library seems not to be complete in th Version 8.1.0
when i try to import System.Data.SqlClient, no suggestion appears
i don't know how can this be possible 😕
2 weeks ago - last edited 2 weeks ago
.net version changes with V8.
Use Microsoft.Data.SqlClient instead of System.Data.SqlClient;
2 weeks ago
yes it did work with Microsoft.Data.SqlClient
Thanks for your help