Results 1 to 3 of 3
  1. #1
    fvmontano is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2023
    Posts
    2

    does anybody know how to convert .net in ms access?

    using System;
    using System.Collections.Specialized;
    using System.Net;

    using (WebClient client = new WebClient())
    {
    byte[] response =
    client.UploadValues("https://semaphore.co/api/v4/messages", new NameValueCollection()
    {
    { "apikey", "" },
    { "number", "09998887777" },


    { "message", "I just sent my first message with Semaphore" },
    { "sendername", "SEMAPHORE" },
    });
    string result = System.Text.Encoding.UTF8.GetString(response);
    }

  2. #2
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    274
    Give this a try:
    Code:
    Sub PostIt()
        Dim objReq As Object
        Set objReq = CreateObject("MSXML2.ServerXMLHTTP")
        
        Dim postBody As String
        postBody = _
        "{" & _
            """apikey"": ""WRITE_API_KEY_HERE""," & _
            """number"": ""09998887777""," & _
            """message"": ""I just sent my first message with Semaphore""," & _
            """sendername"": ""SEMAPHORE""" & _
        "}"
    
        With objReq
            .Open "POST", "https://semaphore.co/api/v4/messages", False
            .setRequestHeader "Content-Type", "application/json"
            .Send postBody
            MsgBox .responseText
        End With
        
        Set objReq = Nothing
    End Sub

  3. #3
    fvmontano is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2023
    Posts
    2
    Thank you Edgar, it worked

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-03-2021, 09:40 AM
  2. Replies: 6
    Last Post: 09-24-2019, 04:38 PM
  3. Convert linked access 2003 file to access 2010
    By abhijeetkadam in forum Access
    Replies: 1
    Last Post: 11-13-2013, 12:44 PM
  4. Replies: 1
    Last Post: 11-25-2011, 11:16 AM
  5. Replies: 9
    Last Post: 08-07-2011, 11:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums