What is api ? // api connection to sql server //connect api to database

Опубликовано: 22 Июль 2026
на канале: 5 star coder
61
13

api connection to sql server//api connection to sql server//connect api to database #api #sql

🧑‍💻 Program 1
file_name:-ItemsController

Imports System.Net
Imports System.Net.Http
Imports System.Web.Http
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq

Namespace Controllers
Public Class ItemsController
Inherits ApiController

Function getvalues(qty As Integer) As HttpResponseMessage
Return Request.CreateResponse(HttpStatusCode.OK, getitemlist.ToList)

End Function
Function getitemlist() As List(Of JToken)
Dim ilist As New List(Of itemlist)
Dim sqlconn As String
sqlconn = "data source=LAPTOP-BR93C2TN;initial catalog=Studentmaster;user id=sa;password=your password"

Dim conn As New SqlClient.SqlConnection(sqlconn)
Dim qry As String
qry = "Select * from item_master"
Dim comd As New SqlClient.SqlCommand(qry, conn)
Dim rd As SqlClient.SqlDataReader
Try
conn.Open()
rd = comd.ExecuteReader
Do While rd.Read
Dim items As New itemlist
items.item_name = rd.Item("item_name")
items.rate = rd.Item("rate")
items.mrp = rd.Item("mrp")
items.stock = rd.Item("stock")
ilist.Add(items)
Loop
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Error")
End Try
If Not (conn Is Nothing) Then
conn.Close()
End If
Dim strserlize As String = JsonConvert.SerializeObject(ilist, Formatting.Indented)
Dim newstring = JsonConvert.DeserializeObject(Of JArray)(strserlize).Root.ToList()
getitemlist = newstring
End Function
End Class
End Namespace


🧑‍💻 Program 2
file_name:- display.vb
Public Class itemlist
Public Property item_name As String
Public Property rate As Integer
Public Property mrp As Integer
Public Property stock As Integer
End Class



✅ Title
YouTube API,
SQL Server,
Connect YouTube API to SQL,
YouTube data to database,
YouTube video titles,
API to SQL Server,
store YouTube data,
Python YouTube API,
insert API data to SQL Server,
SQL database YouTube,
YouTube Data API v3,
fetch YouTube videos,
backend automation,
YouTube to SQL tutorial,
automate data insertion,
YouTube video info,
content creator tools,
data pipeline tutorial,
REST API SQL Server,
ETL process YouTube,
api connect to sql management studio,
api connection to sql server,
api connect,
api connect tutorial for beginners,
api connection in power bi,
api connection in react js,
api connection tutorial,
api connection in python,
api connector,
api connection in flutter
api connect to sql management studio,
api connection to sql server,
asp.net web api connect to sql server,
asp.net core web api connect to sql server

📌 Hashtags
#YouTubeAPI #SQLServer #BackendAutomation #DataIntegration #PythonAPI #YouTubeAnalytics #DeveloperTools #ETLTutorial #StoreYouTubeData #DataPipeline #YouTubeToSQL #APITutorial #TechTutorial