Preferred ASP database

Preferred ASP database

am 22.10.2007 16:00:21 von jp2code

The provider I host my website on gives me three options when it comes to
databases:

1. Microsoft Access
2. MySQL
3. MSSQL

I have used Access in the past, and it is adequate for the minor database
work I plan on doing.

However, I would like to learn some quality skills, just in case a client
wants to hire me to do some database work one day.

Which database would be the best to learn? What are the strengths of one
verses the other? What are their weaknesses? Which one is the simplest to
write code for? Which has the most code examples using Classic ASP?

Thanks for the help!
~Joe

Re: Preferred ASP database

am 22.10.2007 16:17:52 von reb01501

jp2code wrote:
> The provider I host my website on gives me three options when it
> comes to databases:
>
> 1. Microsoft Access
> 2. MySQL
> 3. MSSQL
>
> I have used Access in the past, and it is adequate for the minor
> database work I plan on doing.
>
> However, I would like to learn some quality skills, just in case a
> client wants to hire me to do some database work one day.
>
> Which database would be the best to learn? What are the strengths of
> one verses the other? What are their weaknesses? Which one is the
> simplest to write code for? Which has the most code examples using
> Classic ASP?
>
I have never seen online examples for using ASP with MySQL. Of course, I
have never looked at their website either ...

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Preferred ASP database

am 22.10.2007 16:45:14 von jp2code

"Bob Barrows [MVP]" wrote:
> I have never seen online examples for using ASP with MySQL. Of course, I
> have never looked at their website either ...

So MSSQL is the preferred database?

My host allows me 10 MySQL databases, but only one MSSQL database.

I can't see any need for more than one database (as long as I can house as
many tables that I need), so I don't see any plus to having 10 databases in
one format verses one database in the other format with more tables.

How would I start with one of these databases? I can tell my host to create
a database and give it a name, but then I need to add tables, then items,
and eventually relationships.

Doing all of this with code I create in a webpage seems cumbersome. Will one
of these databases allow me to create, input and modify my data on my PC for
uploading to my host? That was what I did with Access in the past, but I
don't know how to create/open a database on my PC through MySQL or MSSQL.

I'd like to know what the strong parts are to each database before I get
started. After that, my next question will be:
How do I get started with one of these databases? How do I create it on my
PC? How do I get to the database's interface? Etc.

Re: Preferred ASP database

am 22.10.2007 17:02:15 von reb01501

jp2code wrote:
> "Bob Barrows [MVP]" wrote:
>> I have never seen online examples for using ASP with MySQL. Of
>> course, I have never looked at their website either ...
>
> So MSSQL is the preferred database?

No, its' MY preferred database. I do intranet applications so it suits
my purposes well. That does not mean it will be YOUR preferred database.

>
> My host allows me 10 MySQL databases, but only one MSSQL database.
>
> I can't see any need for more than one database (as long as I can
> house as many tables that I need), so I don't see any plus to having
> 10 databases in one format verses one database in the other format
> with more tables.
>
> How would I start with one of these databases? I can tell my host to
> create a database and give it a name, but then I need to add tables,
> then items, and eventually relationships.
>
> Doing all of this with code I create in a webpage seems cumbersome.
> Will one of these databases allow me to create, input and modify my
> data on my PC for uploading to my host? That was what I did with
> Access in the past, but I don't know how to create/open a database on
> my PC through MySQL or MSSQL.
>
> I'd like to know what the strong parts are to each database before I
> get started. After that, my next question will be:
> How do I get started with one of these databases? How do I create it
> on my PC? How do I get to the database's interface? Etc.

Start with this:
http://www.aspfaq.com/show.asp?id=2442


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Preferred ASP database

am 22.10.2007 17:03:00 von reb01501

jp2code wrote:
> How would I start with one of these databases? I can tell my host to
> create a database and give it a name, but then I need to add tables,
> then items, and eventually relationships.
>
This may also be useful as well:
http://www.aspfaq.com/show.asp?id=2214
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Preferred ASP database

am 22.10.2007 17:50:05 von jp2code

Thanks Mr. Barrows. You have answered my question.

If I have other questions about databases, I will ask them in another
thread.

"Bob Barrows [MVP]" wrote:
> This may also be useful as well:
> http://www.aspfaq.com/show.asp?id=2214

Re: Preferred ASP database

am 23.10.2007 09:34:44 von Adrienne Boswell

Gazing into my crystal ball I observed "jp2code"
writing in news:uokwhPLFIHA.4752@TK2MSFTNGP04.phx.gbl:

> The provider I host my website on gives me three options when it comes
> to databases:
>
> 1. Microsoft Access
> 2. MySQL
> 3. MSSQL
>
> I have used Access in the past, and it is adequate for the minor
> database work I plan on doing.
>
> However, I would like to learn some quality skills, just in case a
> client wants to hire me to do some database work one day.
>
> Which database would be the best to learn? What are the strengths of
> one verses the other? What are their weaknesses? Which one is the
> simplest to write code for? Which has the most code examples using
> Classic ASP?
>
> Thanks for the help!
> ~Joe
>
>

A lot of hosts will offer only MySQL or access. If you're ever going to
get into PHP, that comes almost only with MySQL.

The coding differences between MySQL and MSSQL are few, but important.
For example, date() in ASP produces MM-DD-YYYY, and MySQL stores dates
as YYYY-MM-DD. I just created a function to swap it around. MSSQL uses
AUTOINCREMENT and MySQL uses AUTO_INCREMENT. There are other
differences, but for the most part, MySQL is pretty much the same.

Personally, I like MySQL better and MSSQL. If you have Access tables,
MySQL has a nice conversion tool, and there are some nice GUI
applications for MySQL as well, HeidiSQL comes to mind.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: Preferred ASP database

am 23.10.2007 10:28:35 von exjxw.hannivoort

Adrienne Boswell wrote on 23 okt 2007 in
microsoft.public.inetserver.asp.general:

> The coding differences between MySQL and MSSQL are few, but important.
> For example, date() in ASP produces MM-DD-YYYY, and MySQL stores dates
> as YYYY-MM-DD.

All these database engines store date/time in some internal format,
inconsequential to the programmer. [except for the resolution]

ASP dos not produce any format, as it is just a platform.

ASP vbscript date-to-string conversion,
and ASP jscript date-to-string conversion,
convert a date/time value to a string,
depending on the operating system's regional settings.

So
vbscript date() does not produce this MM-DD-YYYY format,
it just returns the date/time value in internal format.

The date-to-string conversion,
as used by response.write() because it needs a string as parameter,
does that on your machine with your regional settings.

For entering a date/time by way of a SQL string,
it is important to know what the SQL engine accepts as data/time strings,
I would hope all engines accept YYYY-MM-DD and YYYY/MM/DD.

The error prone MM-DD-YYYY should not even be considered as SQL input
by any serious programmer.

=====================

So under Jet/Access, ASP/vbscript:

myDate = #2007-10-23#
sql = "... [date] = #" & myDate & "#;"

would involve the peculiarities of the regional settings,
introduced by the date-to-string conversion,
that could(!) be inconsistent with the Jet engine,

while this would not:

myDate = "2007-10-23"
sql = "... [date] = #" & myDate & "#;"

[Bob will correct me where I am wrong]

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: Preferred ASP database

am 23.10.2007 11:58:30 von reb01501

Evertjan. wrote:
> [Bob will correct me where I am wrong]

No corrections needed, just a little additional info:

VBSCRIPT stores a datetime value as a Double number, with the whole number
portion representing the number of days since the seed date (I can't
remember OTOH what that date is, maybe 1899-12-31, maybe 1900-01-01 - it
doesn't really matter) and the decimal portion representing the time of day:
..0 = midnight, .5 = noon. As Evertjian says, implicit conversions to string
use the regional settings of the user under whose context the script is
running (in ASP, that may likely be the IUSR_machinename account).

As for passing date values to a database engine, format issues can be
avoided by using parameters rather than dynamic sql.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"