BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I thought the hard part was reading a SAS Dataset and its metadata. It turned out to be easy.

The hard part actually comes when its time to update a SAS dataset after editing its content, variable attributes (like variable name, format, informat, column label, etc). What makes it seem impossible using the SAS Integrated Object Model (IOM) is the fact that not every SAS dataset has a suitable column that can be used as a primary key. Setting up an InsertCommand/DeleteCommand/UpdateCommand for an OleDBDataAdapter object requires a primary key, otherwise you get this error message:

"Dynamic SQL generation is not supported against a SelectCommand that does not return any base table information."

Now if someone out there can point me to a solution without resorting to writing and submitting a DATASTEP-based code, that would be great. Of course, with the SAS dataset content read successfully into a DataGridView control (with SAS DATE formats converted into a DateTime format), writing a DATASTEP-based code to save the grid's content into a SAS dataset should not be that difficult.

Or is it? 🙂

Thanks, Audi
1 REPLY 1
deleted_user
Not applicable
Audi, did you ever find a solution to this.

sas-innovate-white.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 886 views
  • 0 likes
  • 1 in conversation