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 Discussions (General)
 admin_mod_dbsetup.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 08 August 2003 :  08:16:08  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
(Not sure if this is a bug)
I have just noticed the following code in admin_mod_dbsetup.asp in the Createtable sub:

		if fdefault <> "" then
			select case strDBType
				case "access"
					if Instr(lcase(strConnString), "jet") then strSql = strSql & "DEFAULT " & fDefault
				case else
					strSql = strSql & "DEFAULT " & fDefault
			end select
		end if


This SQL string produced for Access is not different to the string for other databases. Is this a typo or has it been forgotten (to remove?
Just wanted to let you know.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - Davio on 08 August 2003 14:44:18

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 08 August 2003 :  12:26:10  Show Profile  Visit HuwR's Homepage
Nothing wrong with it, don't forget there are 2 different cases when strDBType is access, and if you are using the *.mdb driver rather than jet, it does not support the DEFAULT directive.
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 08 August 2003 :  13:57:10  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Aaah, now I understand!
Thanks for the clarification, Huw!

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 08 August 2003 :  16:11:09  Show Profile  Visit HuwR's Homepage
No probs
Go to Top of Page

MasterOfTheCats
Junior Member

103 Posts

Posted - 09 August 2003 :  02:57:54  Show Profile
Shouldn't this read like:

if Instr(lcase(strConnString), "jet") > 0 then

I know that vbFalse is 0, and that is not a bug, but...
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 09 August 2003 :  10:40:25  Show Profile
In vbscript 0 = False and anything else is equal to True. So if Instr(lcase(strConnString), "jet") returns 0, it would mean the word 'jet' was not found in strConnString and the line of code would not be executed.
If it returned 1, 2, 3, 567,... etc. the statement would be True, meaning it found the starting position of the word 'jet' in the string.

The statement can be written the same way you posted.

It can also be written as:
if Instr(lcase(strConnString), "jet") = True then ...
if Instr(lcase(strConnString), "jet") <> 0 then ...

But we decided to use the short version of it.

Support Snitz Forums
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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07