Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL - API (mySqlLib.dll)

Posted on 2004-05-01
4
Medium Priority
?
937 Views
Last Modified: 2007-12-19
Hello, How can you make tables with this api?  
0
Comment
Question by:dawnyd01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
eAi2k earned 80 total points
ID: 10971315
I've never used this dll, but you can use ADODB to create tables:

I assume you've got MyODBC set up and a DSN, if so, then the code you require in VB is somthing like this:

  Set conntemp = CreateObject("adodb.connection")  
  conntemp.Open "DSN=[YOUR DSN NAME HERE]" ' connect

  mySQL = "Create table [table name here]"
  conntemp.Execute mySQL   ' execute the code

  set conntemp = Nothing

See http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html for more advanced create syntax (such as adding fields etc)

eAi
0
 

Author Comment

by:dawnyd01
ID: 10971941
The whole reasion for the dll is not to have anything to do with myODBC or ODBC and dsn's.
0
 

Author Comment

by:dawnyd01
ID: 10981801
Found out how by just playing around with it....  check it out, it works great...

Dim mysql_options As Long
Set mysql = New cMysql
mysql.real_connect txtHost, txtUser, txtPass, txtDB, CLng(txtPort), , 0
mysql.query "CREATE TABLE people5(name varchar(50), email varchar(50))"
Set mysql = Nothing
If mrec Is Nothing Then Else mrec.Close
Set mrec = Nothing

sys admin, please do not delete this question, just refund points so people can learn from this.

Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question