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

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 V33(.03) BUG: MySQL and DSN
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nathan
Help Moderator

USA
7664 Posts

Posted - 21 April 2002 :  02:43:11  Show Profile  Visit Nathan's Homepage
Because I'm too stupid to make the Windows MySQL OBDC drivers work without a DSN I use a DSN to connect to my database.

When using a DSN to connect to the database there is no need for a username and password because its already determined in the DSN setup.

I experience a problem with RC=5 because its setup to accept a username and password then tries to add it to the connection string on line 2131

	strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))


To overcome this, I made this little change to setup.asp. Line 2131 became

if strUsingMySQLDSN then
strInstallString = strConnString
else
strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if


And I also added this to config.asp

'If you are using a DSN with MySQL, uncomment this line.
'strUsingMySQLDSN = TRUE


That seems to fix it

Nathan Bales
Snitz Exchange | Do's and Dont's

Edited by - Nathan on 21 April 2002 02:44:14

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 22 April 2002 :  16:05:17  Show Profile
That's a good one Nate. Should be moved to the DEV: Bug Reports forum.

With our current setup, using MySQL and a DSN connection won't work as you had mentioned. We could have the option for the user to choose if they are using a DSN or a DSNless connection. Or we could just check the connection string if the username and password option is included in the string.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 22 April 2002 :  18:13:48  Show Profile  Visit Nathan's Homepage
So. . .

if instr(strConnString,"uid=") then
strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
else
strInstallString = strConnString
end if


I dunno if I would consider it a bug, so much as a non-implemented convience

Nathan Bales
Snitz Exchange | Do's and Dont's
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 02 May 2002 :  12:34:33  Show Profile
This needs to be fixed for the next version.
Can this be moved to the bug forums please?

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 02 May 2002 :  12:49:54  Show Profile
moved...

I had to do something similar for Access Databases as well to accommodate the changes we are making for new installations of the forum with an Access DB.
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 02 May 2002 :  23:04:09  Show Profile
Don't know how modified your version of the setup.asp file is Richard but there is another location where the CreateConnectionString() function is called, that also needs the same fix. It's in the ResponsCode = 3 section. You can just do a search for CreateConnectionString and you will find it:
if strDBType <> "access" then
if instr(strConnString,"uid=") then
strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
else
strUpgradeString = strConnString
end if

end if
Code in red is what I added.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 02 May 2002 :  23:12:15  Show Profile
Actually, what I did for Access was just set it to the strConnString. I don't have it asking for a Database Username/password at all.

strUpgradeString is already set to strConnString unless strDBType <> "access" so that's covered already.

for strInstallString, I have this: (haven't added the fix for DSNs yet)

	if strDBType = "access" then
strInstallString = strConnString
else
strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if
Go to Top of Page

avs
New Member

USA
83 Posts

Posted - 10 May 2002 :  02:16:12  Show Profile
Richard, could you post the DSN fix when you have it implemented I seem to be having some problems with DSN and access. It's working ok for now, but I want to incorporate it just to be sure.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 03 August 2002 :  06:56:29  Show Profile
changed this:

		strUpgradeString = strConnString
strSQL_Server = Request.Form("Sql_Server")

if strDBType <> "access" then
strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if


to this:

		strSQL_Server = Request.Form("Sql_Server")

if strDBType = "access" or not Instr(strConnString,"uid=") > 0 then
strUpgradeString = strConnString
else
strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if



and changed this:

	if strDBType = "access" then
strInstallString = strConnString
else
strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if


to this:

	if strDBType = "access" or not Instr(strConnString,"uid=") > 0 then
strInstallString = strConnString
else
strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if


fixed in v3.4
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07