Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
RuudJeursen
Regular Visitor

Step 4: Get a dataset to add rows into a Power BI table ( Example: Push a dataset into a dashboard)

Hi,

 

I got as far as the last step in this example: adding rows to the dataset.

Greated the token, created the dataset en got back the datasetID.

When adding the rows I got the error-message in Visual Studio on the code-line 

var response = (HttpWebResponse)request.GetResponse();

:

"An unhandled exception of type 'System.Net.WebException' occurred in System.dll 

Additional information: De externe server heeft een fout geretourneerd: (404) Niet gevonden."

 

Can someone help me out on this ?

 

Console-screenshot

 

Console 14-1-2017 13-24-08.jpg

 

Regards, Ruud

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@RuudJeursen

If you're using the same code as the sample's, I guess that the the cause of the problem is in this line in the function GetDataset().

                    //Get the first id
                    datasetId = results["value"][0]["id"];

It would always return the first datasetId instead of the one created in the code if there're more datasets alreay existing.

Change the line to lines

                    //Get the first id
                    //datasetId = results["value"][0]["id"];

                    var datasets = results["value"];

                    foreach (var ds in datasets) {

                        //return the id of the first salesmarketing dataset
                        if (ds["name"] == "SalesMarketing") {
                            datasetId = ds["id"];
                            break;
                        }
                    }

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee

@RuudJeursen

If you're using the same code as the sample's, I guess that the the cause of the problem is in this line in the function GetDataset().

                    //Get the first id
                    datasetId = results["value"][0]["id"];

It would always return the first datasetId instead of the one created in the code if there're more datasets alreay existing.

Change the line to lines

                    //Get the first id
                    //datasetId = results["value"][0]["id"];

                    var datasets = results["value"];

                    foreach (var ds in datasets) {

                        //return the id of the first salesmarketing dataset
                        if (ds["name"] == "SalesMarketing") {
                            datasetId = ds["id"];
                            break;
                        }
                    }

Hello , 

 

I got exactly the same error with the same sample code as used in the mentioned link.

 

I changed the code as per the solution , but I'm still getting the same error.

 

Can anyone help me?

 

Thanks in advance.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.