WhoCalls support forum    


Welcome to the WhoCalls support forum.
Before entering a query/request please search the forum to see if someone else has asked the question before.
Please feel also free to respond to queries from other users if you have experienced the same type of problem and found a solution to it. 
Our support team will monitor this forum and endeavour to provide answers to the queries posted.
Please make sure to post your query to the right forum as there is a separate forum for each application provided by MAW Software.

Show messages for: Last 7 days Last 30 days All (Digest of all)


Back to the forum

On Friday , the 05.27.2005, MAW Support wrote at 11:55:08 :

>Whocalls works with MySql database?

Karina

You can use WhoCalls with MySql, by using a VBS call.
As a sample on how to use MySql use the following VBS script.
It will insert the CallerID and the CallerName into the TCallers table.

Sincerely,

Marc Wanderer

'*********************************
Option Explicit

'---- CursorTypeEnum Values ----
' Const adOpenForwardOnly = 0
' Const adOpenKeyset = 1
Const adOpenDynamic = 2
' Const adOpenStatic = 3

'---- LockTypeEnum Values ----
' Const adLockReadOnly = 1
Const adLockPessimistic = 2
' Const adLockOptimistic = 3
' Const adLockBatchOptimistic = 4

'---- CursorLocationEnum Values ----
' Const adUseServer = 2
Const adUseClient = 3

'---- ConnectModeEnum Values ----
' Const adModeUnknown = 0
' Const adModeRead = 1
Const adModeWrite = 2
' Const adModeReadWrite = 3
' Const adModeShareDenyRead = 4
' Const adModeShareDenyWrite = 8
' Const adModeShareExclusive = &Hc
' Const adModeShareDenyNone = &H10
' Const adModeRecursive = &H400000

Dim Conn, RS
Set Conn = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
Conn.Provider = "MSDASQL"
Conn.Mode = adModeWrite
Conn.Open "Driver=MySQL; Server=localhost; Database=Users;", "MyUser",
"nopwd"
' For the new ODBC 3.51 driver!
' Conn.ConnectionString = _
' "DRIVER={MySQL ODBC 3.51 Driver};DATABASE=DBName;SERVER=localhost;"

Conn.CursorLocation = adUseClient

RS.CursorLocation = adUseClient
RS.Open "Select * from TCallers", Conn, adOpenDynamic, adLockPessimistic
RS.Fields("CallerID") = "@CID"
RS.Fields("CallerName") = "@CIN"
RS.Update

RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
'*********************************







Post reply:

Name:
E-Mail:
Subject:
Message:
SPAM code displayed
next to this:

CGIForum (C) Markus Triska


Home to