Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub test()
- Dim strsql1, tr As String
- Dim rst As ADODB.Recordset
- strsql1 = "SELECT * FROM FP WHERE SUBMISSION_ID = 5683;"
- Set cn = New ADODB.Connection
- cn.Open "Provider=Microsoft.ace.OLEDB.12.0; Data Source=\REDACTED.accdb;"
- Set rst = New ADODB.Recordset
- rst.Open strsql1, cn, adOpenStatic
- End Sub
- Open connection
- Execute about the simplest SQL query possible
- End
- Dim strsql1, tr As String
- Dim strsql1 [As Variant], tr As String
- Public const FP_DATABASE_CONNECTION_STRING As String = "Provider=Microsoft.ace.OLEDB.12.0; Data Source=\REDACTED.accdb;"
- selectFpId5683 = "SELECT * FROM FP WHERE SUBMISSION_ID = 5683;"
- Option Explicit
- Public Const FP_DATABASE_CONNECTION_STRING As String = "Provider=Microsoft.ace.OLEDB.12.0; Data Source=\REDACTED.accdb;"
- Function GetAllFpRecordsWithId5683() As ADODB.Recordset
- Dim fpConnection As ADODB.Connection
- Set fpConnection = New ADODB.Connection
- fpConnection.Open FP_DATABASE_CONNECTION_STRING
- Dim selectFpId5683 As String
- selectFpId5683 = "SELECT * FROM FP WHERE SUBMISSION_ID = 5683;"
- Dim recordsWhereId5683 As ADODB.Recordset
- Set recordsWhereId5683 = New ADODB.Recordset
- recordsWhereId5683.Open selectFpId5683, fpConnection, adOpenStatic
- Set GetAllFpRecordsWithId5683 = recordsWhereId5683
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement