March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I am trying to create a Streaming dataset in Power BI, where data from SQL server is being pushed.
I have found resources online to achieve this using Power shell.
Is it possible to achieve the same in VB.net?
Appreceate any help!
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
I don't know much about VB.NET. But this process is roughly divided into two steps:
1. Get data from SQL Server using VB.net.
Reference:
How to connect to a database and run a command by using ADO.NET and Visual Basic .NET;
how to access remote sql server database from vb.net windows form application.
2. Use VB.net to send an HTTP request to add rows to the Streaming dataset.
Reference:
How to send a POST in .net vb?
Option Infer On Imports System.Net Imports System.Text Public Class Test Private Sub TESTRUN() Dim s As HttpWebRequest Dim enc As UTF8Encoding Dim postdata As String Dim postdatabytes As Byte() s = HttpWebRequest.Create("http://www.textmarketer.biz/gateway/") ---------URL enc = New System.Text.UTF8Encoding() postdata = "username=*****&password=*****&message=test+message&orig=test&number=447712345678" ------data postdatabytes = enc.GetBytes(postdata) s.Method = "POST" s.ContentType = "application/x-www-form-urlencoded" s.ContentLength = postdatabytes.Length Using stream = s.GetRequestStream() stream.Write(postdatabytes, 0, postdatabytes.Length) End Using Dim result = s.GetResponse() End Sub End Class
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Is this problem solved?
Best Regards,
Icey
Hi @Anonymous ,
I don't know much about VB.NET. But this process is roughly divided into two steps:
1. Get data from SQL Server using VB.net.
Reference:
How to connect to a database and run a command by using ADO.NET and Visual Basic .NET;
how to access remote sql server database from vb.net windows form application.
2. Use VB.net to send an HTTP request to add rows to the Streaming dataset.
Reference:
How to send a POST in .net vb?
Option Infer On Imports System.Net Imports System.Text Public Class Test Private Sub TESTRUN() Dim s As HttpWebRequest Dim enc As UTF8Encoding Dim postdata As String Dim postdatabytes As Byte() s = HttpWebRequest.Create("http://www.textmarketer.biz/gateway/") ---------URL enc = New System.Text.UTF8Encoding() postdata = "username=*****&password=*****&message=test+message&orig=test&number=447712345678" ------data postdatabytes = enc.GetBytes(postdata) s.Method = "POST" s.ContentType = "application/x-www-form-urlencoded" s.ContentLength = postdatabytes.Length Using stream = s.GetRequestStream() stream.Write(postdatabytes, 0, postdatabytes.Length) End Using Dim result = s.GetResponse() End Sub End Class
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |