Getting UPC Data from the Web and Parsing it Into a Table
This video tell how to retrieve UPC information from a public database on the web and parse it into fields in your MS Access database. A series of queries finishes the job and puts the data into a table.
The code I used:
Public Sub ReadJSON(UPC As String)
Dim reader As New XMLHTTP60
Dim URL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
URL = "https://api.upcitemdb.com/prod/trial/lookup?upc=" & UPC
reader.Open "get", URL, False
reader.send
Do Until reader.ReadyState = 4
DoEvents
Loop
If reader.status = 200 Then
Set db = CurrentDb
Set rs = db.OpenRecordset("json", dbOpenDynaset, dbSeeChanges)
rs.AddNew
rs!inputtext = reader.responseText
rs.Update
DoEvents
Else
Dim errorcode As Integer
errorcode = reader.status
MsgBox "Connection not made. Error code " & errorcode
End If
End Sub
See my other channels:
Current news on the economy and economic concepts: https://www.youtube.com/channel/UCl0IMB6BJMSNuNN5rPd6jxw
Current thoughts on leadership topics: https://www.youtube.com/channel/UCDsp8v1TezEiXIdgVijDK7w
Blockchain and Cryptocurrency News:
https://www.youtube.com/channel/UCP3uIfVMCTSNfpvwHf6EEow
-
8:40
History With Kayleigh
18 hours agoAncient Wind Energy Technology! Windmills at Nashtifan, Iran
4.66K18 -
12:57
ryanhoguepassiveincome
16 hours agoTOP 5 NICHES 🔥 Print on Demand Niche Research # 214 — (6/30/2024)
7.08K3 -
18:40
GeekyNerdyTechy
1 day agoGVM SD300B Pro Tutorial & Review - Powerful, Versatile, and Beautiful!
10.3K -
23:44
DepressedGinger
1 day ago $0.20 earned*FIRST* Donald Trump vs Gavin Newsom Election Prediction if Biden drops out
6.54K5 -
15:23
Freakin' Reviews
22 hours agoTesting Two Products From Walmart's As Seen on TV Aisle! Mr. Beast Lunch Box & Cool 360
12.6K7 -
36:34
TheTapeLibrary
1 day ago $0.09 earnedScary Stories Around The Campfire: 3 More Creepy Tales To Keep You Up At Night
2.67K6 -
0:55
Hannah Barron
20 hours agoFish Sticks!
11.4K24 -
36:34
Science & Futurism with Isaac Arthur
1 day ago $0.23 earnedFree Will, Quantum & Orchestrated Objective Reduction
10.6K9 -
15:49
Degenerate Jay
3 days ago $0.15 earnedThe Rejected Assassin's Creed Nintendo Game - Assassin's Creed Lost Legacy
8.99K4 -
11:11
America Uncovered
16 hours ago $0.36 earnedI Regret to Inform You the Debate Was Worse Than You Imagined
21.3K31