Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 ASP Create MySql Database
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

DarkDrift
Junior Member

USA
126 Posts

Posted - 11 March 2005 :  21:49:38  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
I am trying to connect to mysql qith myODBC and then Create a Database. Some code that i have is

my_conn2.open "driver={MySQL ODBC 3.51 Driver};option=4;server=" & Request.Form("db_host") & ";user=" & Request.Form("db_root") & ";password=" & Request.Form("db_pass") & ";"
strsql = "CREATE DATABASE '" & Request.Form("db_name") & "'"
my_conn.execute(strsql)
my_conn2.close
set my_conn2 = nothing
set my_conn2 = Server.CreateObject("ADODB.CONNECTION")
my_conn2.open "driver={MySQL ODBC 3.51 Driver};option=4;server=" & Request.Form("db_host") & ";user=" & Request.Form("db_root") & ";password=" & Request.Form("db_pass") & ";DATABASE=" & Request.Form("db_name") & ";"

That just simply doesn't work i get a nice fat err the error is an error has occured around '*WHATEVER DB_NAME WAS*' .....

Kinda stumped thanks for any help anyone can provide

http://www.xcalliber.com - The Future of Boards

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 12 March 2005 :  00:53:35  Show Profile  Visit Gremlin's Homepage
Please post the error message.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

DarkDrift
Junior Member

USA
126 Posts

Posted - 12 March 2005 :  22:32:57  Show Profile  Visit DarkDrift's Homepage  Send DarkDrift an AOL message
nvm Totally wrong code.. thanks anyways

http://www.xcalliber.com - The Future of Boards
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.49 seconds. Powered By: Snitz Forums 2000 Version 3.4.07