�How to Prompt user to construct the connection string at runtime!!!
�It uses the same interface that ADODC, DataEnvironment etc use.
�References:�1. Microsoft OLE DB Service Component 1.0�2. Microsoft ADO 2.5
�Visual Basic Code Below
Public Function GetConnectionString(Optional strOLE As String =�OLEDB�) As StringOn Error GoTo ErrHandler
Dim Conn As ADODB.ConnectionDim ObjectDataLink As MSDASC.DataLinksSet Conn = New ADODB.ConnectionSet ObjectDataLink = New MSDASC.DataLinksSelect Case strOLECase �OLEDB�Conn = ObjectDataLink.PromptNewGetConnectionString = Conn.ConnectionStringCase �ODBC�Conn.ConnectionString = ��Conn.Properties(�Prompt�) = adPromptAlwaysConn.OpenGetConnectionString = Conn.ConnectionStringConn.CloseEnd SelectExit FunctionErrHandler:If Err.Number = 91 Or Err.Number = -2147217842 ThenExit FunctionElseMsgBox �Error: � & Err.DescriptionEnd If
End Function
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :