|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Good morning I would like to have my access db serve as a front-end to an ORACLE DB that allows me to access my oracle/sql back-end report server over the internet. I currently have to log into the program over the internet, select the fields I want, run the SQL statement, download the report and save as a text file, and import the fields into an access table to manipulate. Goal: 1. Have the end-user open the access db. 2. allow the end-use to make selections on a form and click on a command button and when the command button is clicked, an SQL select statement is passed to the back-end and the requested information now appears in the users form and/or table that can be manipulated by another query. Type of help needed: How do I procedure using the code below? NOTE: I have the ip address, port number, server & and db name. Thank you in advance. Where Am I: 1) Dim wsOTRS As Workspace Dim dbOTRS As Database Dim strOTRSConnect As String ' Set wsOTRS = DBEngine.Workspaces(0) Let strOTRSConnect = "ODBC;DSN=OTRS;UID=otrsuser;PWD=otrsuser;" Set dbOTRS = wsOTRS.OpenDatabase("", False, False, strOTRSConnect)
2) strOdbcCon="ODBC" _ & ";DRIVER=SQL Server" - & ";SERVER=YourServer" _ & ";DATABASE=YourDatabase" _ & ";uid=" & strUserName _ & ";pwd=" & strPassword strSQL="SELECT * FROM [" & strOdbcCon & "].OneTable WHERE FALSE" set db=currentdb set rs=dbs.openrecordset(strSQL,dbOpenNapshot) 3) Private Sub OBDC_Click() Declare Function Check_ODBC_Password% Lib "dbodbc7.dll" (ByVal datasource As String, ByVal uid As String, ByVal passwd As String, ByVal hwnd As Integer, ByVal sysname As String) Declare Function Change_ODBC_Password% Lib "dbodbc7.dll" (ByVal datasource As String, ByVal uid As String, ByVal old_passwd As String, ByVal new_passwd As String, ByVal hwnd As Integer, ByVal sysname As String) Function Change_Password(stODBC_DB As String, stUID As Variant, stOldPassword As Variant, stNewPassword As Variant, hwnd As Variant, stSys As Variant) As Integer Change_Password = Change_ODBC_Password(stODBC_DB, stUID, stOldPassword, stNewPassword, hwnd, stSys) End Function Function Check_Password(stODBC_DB As String, stUID As Variant, stPassword As Variant, hwnd As Variant, stSys As Variant) As Integer Check_Password = Check_ODBC_Password(stODBC_DB, stUID, stPassword, hwnd, stSys) End Function End Function
|
|
|