Login | |
|
 |
RE: Mysql database connection variables - 8/15/2006 9:59:43 PM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
From what I see is that you're calling strConnectionString by itself... quote:
strConnectionString = Application("strConnectionString") [...] 'open the Connection using solids as DSN Conn.Open strConnectionString
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: Mysql database connection variables - 8/16/2006 2:39:48 PM
|
|
 |
|
| |
Aitchi
Posts: 6
Score: 0
Joined: 8/14/2006
Status: offline
|
this is what i have now <!-- #include virtual="/includes/headervisitor.asp" --> <% Header "Signup Form" %> <BR> <% 'Declare variables Dim Conn, RS,Returned,strConnectionString, SQL 'Create a database connection object strConnectionString = Application("strConnectionString") Set Conn = server.CreateObject("ADODB.Connection") 'create Recordset object set RS = Server.CreateObject("ADODB.Recordset") 'open the Connection using solids as DSN Conn.Open strConnectionString =mysql_connect ("localhost", "????????", "?????") Set objComm2 = Server.CreateObject("ADODB.Command") objComm2.ActiveConnection = Conn 'if database could not be connected, redirect to error page and diaplay error message 400 if Conn.State = 0 then Response.Redirect "solPRError.asp?ErrorCode=400" end if 'Start Connection object 'Set Conn = Server.CreateObject("ADODB.Connection") 'Conn.ActiveConnection = Conn 'Conn.Open(Sql) = connect_string = "Driver={Mysql}; Server=localhost; Database=goldf3_version1database; UID=????????; PWD=??????" 'const string = "Driver={Mysql}; Server=localhost; Database=goldf3_version1database; UID=????????; PWD=????????" 'SqlConnection connection = new SqlConnection,(connectionString) 'SqlConnection connection = SqlConnection,(connectionString) 'connection.Open() 'Check if space is available SQL = "SELECT COUNT(*) AS NumTrial FROM " & GameAbbreviation & "Players" Set Returned = Conn.Execute(SQL) If CInt(Returned("NumTrial")) >= GameMaxPlayers Then %> All <%= GameMaxPlayers %> account slots are currently occupied. Please check back tomorrow to see if some are available - idle accounts are removed nightly. <% Else %> Fill out this form to create a new account. Be sure to double check all your entries to make sure they are correct. <BR><BR> <B>Note About Multiple Accounts</B><BR> Multiple accounts absolutely are not tolerated on <%= GameName %>. Any user found to hold more than one account will have all accounts involved deleted. There are no second chances, and this rule is actively enforced. <BR><BR> <FORM action="signup.asp" method="POST"> <CENTER> <TABLE cellspacing="5" cellpadding="0" border="0"> <TR> <TD><B>Username (2-20 chars):</B></TD> <TD><INPUT type="text" name="username" maxlength="20"></TD> </TR> <TR><TD colspan="2">Your username is very important; it is the name everyone else in the game will know you by. Think carefully before choosing it because you can't change it later.</TD></TR> <TR> <TD><B>Email (6-40 chars):</B></TD> <TD><INPUT type="text" name="email" maxlength="40" value="<%= Request.Form("email") %>"></TD> </TR> <TR><TD colspan="2">Your email address must be one that you have access to, because your password will be emailed there.</TD></TR> <TR><TD colspan="2" align="center"> <INPUT type="submit" value="Create Account"> </TD></TR></FORM> </TABLE> </CENTER> <% End If Returned.Close 'Clean up Set Returned = Nothing Conn.Close Set Conn = Nothing %> <BR> <CENTER><A href="tos.asp"><B>Terms of Service</B></A></CENTER> <!-- #include virtual="/includes/footervisitor.asp" --> and this is the error i am getting Error Type: ADODB.Connection.1 (0x80004005) SQLState: IM002 Native Error Code: 0 [DataDirect][ODBC lib] Data source name not found and no default driver specified /signupform.asp, line 25
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|