BookmarkSubscribeRSS Feed
AndreasMenrath
Pyrite | Level 9
hi,

I'm developing a .NET program which creates an ADO.NET DataTable from an existing SAS Library via the SAS OleDB dataprovider and now i want to write the changes in the DataTable back to SAS.

After reading the documentation for SAS IT, SAS IOM, SAS OleDB Provider i come to the conclusion that there is no simple way to achieve this. The most helpful documentation i found was this:

http://support.sas.com/documentation/tools/oledb/rr_createdelete.htm

There are three methods described:
1) using SQL Statements will be difficult and i guess that the performance will be terrible if i submit a CREATE TABLE followed by a million INSERT INTO SQL Statements.
2) using the ITableDefinition interface: is this even possible in .NET? Can i add rows to the table?
3) using ADOX: seems to be the only reasonable method to create and fill a SAS dataset. Has anybody tried that method yet?

Am i missing something here? Is there really no simple solution provided by SAS to update or create a new SAS dataset when you are using SAS/IT with the SAS data providers in the .NET Framework?

I hope that Chris or somebody else can help me!
1 REPLY 1
ChrisHemedinger
Community Manager
Andreas,

Here is an example EG custom task that does this:

http://support.sas.com/documentation/onlinedoc/guide/customtasks/samples/FSEdit42.zip

I realize your application is not running within EG, but you could use a similar approach. That is, use the SAS IOM OLE DB provider to read the data, and use the SAS Workspace LanguageService to update the data table using PROC SQL UPDATE.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 996 views
  • 0 likes
  • 2 in conversation