Hi
I have a caller ID software that I would like to change from Microsoft Access database to Mysql and was wondering if somebody could help me. The code i currently have is: -
-
Private Sub OpenDataBase()
-
Set fo = New FileSystemObject
-
Set wrk = CreateWorkspace("", "admin", "", dbUseJet)
-
If Not fo.FileExists(m_stDataPath & "callerid.mdb") Then
-
Set db = wrk.CreateDatabase(m_stDataPath & "callerid.mdb", dbLangGeneral)
-
CreatePhoneDB
-
Else
-
Set db = wrk.OpenDataBase(m_stDataPath & "callerid.mdb")
-
End If
-
Set rs = db.OpenRecordset("PhoneCalls", dbOpenTable)
-
End Sub
-
Private Sub CloseDatabase()
-
db.Close
-
wrk.Close
-
Set db = Nothing
-
Set wrk = Nothing
-
Set fo = Nothing
-
End Sub
-
Private Sub AddRecord()
-
Dim lID As Long
-
Select Case Len(frmLineInfo.Number.Text)
-
Case 0
-
frmLineInfo.Number.Text = "No Number"
-
Case 1
-
Select Case frmLineInfo.Number.Text
-
Case "O"
-
frmLineInfo.Number.Text = "Unavailable"
-
frmLineInfo.CallName.Text = "Unavailable"
-
Case "P"
-
frmLineInfo.Number.Text = "Blocked"
-
frmLineInfo.CallName.Text = "Blocked"
-
End Select
-
End Select
-
Select Case Len(frmLineInfo.CallName.Text)
-
Case 0
-
frmLineInfo.CallName.Text = "-"
-
Case 1
-
Select Case frmLineInfo.CallName.Text
-
Case "O"
-
frmLineInfo.CallName.Text = "Unavailable"
-
Case "P"
-
frmLineInfo.CallName.Text = "Blocked"
-
End Select
-
End Select
-
With rs
-
If (.RecordCount > 0) Then
-
.MoveLast
-
lID = .Fields("id") + 1
-
Else
-
lID = 1
-
End If
-
.AddNew
-
.Fields("id") = lID
-
.Fields("datetime") = Now
-
.Fields("number") = frmLineInfo.Number.Text
-
.Fields("name") = frmLineInfo.CallName.Text
-
.Update
-
End With
-
End Sub
-
Private Function CreatePhoneDB() As Recordset
-
Dim tbl As TableDef
-
Set tbl = db.CreateTableDef("PhoneCalls")
-
With tbl
-
.Fields.Append .CreateField("id", dbLong, 4)
-
.Fields.Append .CreateField("datetime", dbDate, 4)
-
.Fields.Append .CreateField("number", dbText, 20)
-
.Fields.Append .CreateField("name", dbText, 20)
-
db.TableDefs.Append tbl
-
End With
-
Set db = wrk.OpenDataBase(m_stDataPath & "callerid.mdb")
-
Set tbl = db!phonecalls
-
Set idx = tbl.CreateIndex("DateTime")
-
idx.Fields.Append idx.CreateField("datetime")
-
tbl.Indexes.Append idx
-
End Function
-
-
-
4 1632
try to use ADODB library for the purpose.
Sorry im a php coder not a VB6 coder. I was wondering if you could be a little more specific? any links for this would be appreciated.
Thanks
you mean to say all the code you have posted is in PHP ?
why you have posted the question here , why not in PHP forum ?
no the code is vb6 no php. the vb6 code needs changing from a access database to mysql database
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Neil |
last post by:
Hi,
I hope this question isn't too far off topic....I'm almost at my wits
end trying to figure this out.
I have a Mysql database and I wish to automate the backup of the
database because I don't wish to rely on the web host doing so. I am
using the "dbsender.php" script, which is written for this exact
purpose (available at hotscripts.com). If I execute the script via my
browser, the database is emailed to me in a 'gzip' format, which...
|
by: Dafella |
last post by:
The following is code from Xeoport.
It is suppose to access my pop3 account and load email into Mysql
database.
It's not inserting and there is no log or anything to tell me why.
Here is the page.
http://www.dafella.com/xeoport/
The original coder left no contact info.
The reason I think it's the code is because of another issue.
|
by: Mark Wilson CPU |
last post by:
A colleague has written a prototype program in PHP, using a MySQL
database.
It's a relatively simple app, with a restricted set of mysql commands
used (see below). The MySQL DB is being replaced with an Oracle DB
(same schema). My plan
1) globally replace the few mysql commands with intermediate
equivalents (such as myDB_connect for mysql_connect)
2) those central functions would then (for now) call the original
mysql function to prove...
|
by: cooldv |
last post by:
i am running a website on Windows 2000 server with ASP 3 webpages and
Access 2000 database. (with a hosting company)
traffic is slow at this time but expect to grow. lately i have been
reading about sql database and sql server, specially this article:
http://www.aspfaq.com/show.asp?id=2195
will someone help me understand:
1. with *SQL Server*, do i keep my current Access 2000 database and
ASP pages?
|
by: David Heller |
last post by:
I have this schema I exported from a database running mysql version 4.01
I'm trying to create this table on a server running mysql 3.23
I keep getting a syntax error near line 11 (I added the line numbers for
clarity. I think it has a problem with the Table Field "ORDER#" I do
have it quoted as shown below so why do I keep getting syntax errors? I
also have problems with the Table Fields "BY" and "DESC" and they are
quoted the same way....
| |
by: Daven Thrice |
last post by:
Hi,
I've converted the tables from an old Access application to MySql format. I
then linked the tables into access using MyODBC and everything works great
(on my computer). For now, I want to keep Access as a front end, and move
the tables to the Internet. I feel like I'm lost in a maze or something with
some really basic questions.
What do I need in terms of a host? I have been looking at ipowerweb because
they have a reseller...
|
by: baustin75 |
last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie
only when debugging in php designer 2005
--------------------------------------------------------------------------------
Hello,
I have a very simple problem but cannot seem to figure it out. I have a
very simple php script that sends a test email to myself. When I debug
it in PHP designer, it works with no problems, I get the test email. If
|
by: Vladislav Moltchanov |
last post by:
Recently I have changed from Acc97 to Acc2000 (I had to supply some data
entry tools for field data collection for users still using Acc97).
Among lot of other complications coming with Acc2000 (compared with very
reliable acc97) I have got problem with Help: In access 2000 all topics
with DAO are listed in index but otherwise not available, so I am using
two PCs when developing something, to have advantage of ACC97 help,
where all these...
|
by: PHP_Paul |
last post by:
Ok, I'm trying to poineer into the wonderful area of PHP/MySQL programming, but I'm having some difficulties. http://www.paulhq.com/php/freepage.html should register, but when anyone fills something out, it returns a MySQL error: Could not insert data because You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
Here are the codes:
freepage.html...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |