Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql stored procedure for access frontend

Sub spTest()
Dim qdf As DAO.QueryDef, rst As DAO.Recordset
Dim IdValueToProcess As Long

IdValueToProcess = 2  ' test data

Set qdf = CurrentDb.CreateQueryDef("")
qdf.ReturnsRecords = True
qdf.Connect = "ODBC;DSN=myDb;Trusted_Connection=Yes;"
qdf.SQL = "EXEC dbo.getContact " & IdValueToProcess
Set rst = qdf.OpenRecordset(dbOpenSnapshot)

Debug.Print rst!LastName  ' just to make sure we got a result

rst.Close
Set rst = Nothing
qdf.Close
Set qdf = Nothing
End Sub
Comment

sql stored procedure for access frontend

CREATE PROCEDURE getContact 
    -- Add the parameters for the stored procedure here
    @id int = 1
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT * FROM myContacts WHERE ID=@id
END
Comment

PREVIOUS NEXT
Code Example
Sql :: select all domains of database firbird 
Sql :: open mysql port bitnami tomact 
Sql :: mysql listing get a particu particular user firsdt 
Csharp :: how to make an object look at another unity 
Csharp :: asp.net data annotations email 
Csharp :: how to load the active scene unity 
Csharp :: unity load scene 
Csharp :: unity rotation between 2 points 
Csharp :: unity how to convert mouse screen position to world position 
Csharp :: net core get remote ip 
Csharp :: quit button unity 
Csharp :: unity gameobject teleporting 
Csharp :: c sharp split by newline 
Csharp :: c# Escape sequence 
Csharp :: how to find object by ag unity 
Csharp :: get self component in unity 
Csharp :: c# format string to date yyyymmdd 
Csharp :: c# generate random date 
Csharp :: unity c# on trigger enter with specific gameobject 
Csharp :: c# get last character of string 
Csharp :: c# datagridview hide column 
Csharp :: csharp string to double 
Csharp :: c# remove non-alphanumeric characters from string 
Csharp :: byte array to hex c# 
Csharp :: c# private set 
Csharp :: get value from web.config c# 
Csharp :: asp.net core 3.1: cast jObject to dictionary<string,string 
Csharp :: c# write to console 
Csharp :: executable path with app name c# 
Csharp :: c# array last element 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =