Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Sub OPEN_CON1(cn As ADODB.Connection, db As String, ServerName As String) Set cn = New ADODB.Connection cn.Provider = "sqloledb" cn.ConnectionTimeout = 25 cn.Properties("Data source").Value = Trim(ServerName) cn.Properties("Initial Catalog").Value = Trim(db) cn.Properties("User ID").Value = "sa" cn.Properties("Password").Value = "" cn.CursorLocation = adUseClient cn.Open , "sa", "" End Sub Public Sub save_Table(cn As ADODB.Connection, lpTable_No As String, Customer_name As String, Time_in As String, Time_Out As String) Dim rs As ADODB.Recordset Dim sql As String Set rs = New ADODB.Recordset sql = "select * from The_Table where Table_No='" & lpTable_No & "'" rs.LockType = adLockOptimistic rs.CursorType = adOpenKeyset rs.Open sql, cn With rs If .BOF = True And _ .EOF = True Then .AddNew !Table_No = lpTable_No End If !Customer_name = grid.TextMatrix(grid.Row, 1) !Time_in = Trim(grid.TextMatrix(grid.Row, 2)) !Time_Out = grid.TextMatrix(grid.Row, 3) .Update .Close End With Set rs = Nothing End Sub Private Sub CmdSave() Dim cn As ADODB.Connection Call OPEN_CON1(cn, "MyTable", "Winpos") Call save_Table(cn, grid.TextMatrix(grid.Row, 0), grid.TextMatrix(grid.Row, 1), grid.TextMatrix(grid.Row, 2), grid.TextMatrix(grid.Row, 3)) Set cn = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Microsoft Access combo box help||2||57|
|Access 2013 combo box not working||3||74|
|Do my app need to have windows media player to use axwindowsmediaplayer in Visual Basic?||6||151|
|MS SQL store procedure to calculate and return result||6||74|
Join the community of 500,000 technology professionals and ask your questions.