Preferred ASP database

J

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
 
B

Bob Barrows [MVP]

jp2code said:
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 ...
 
J

jp2code

Bob Barrows said:
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.
 
B

Bob Barrows [MVP]

jp2code said:
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
 
J

jp2code

Thanks Mr. Barrows. You have answered my question.

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

Adrienne Boswell

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.
 
E

Evertjan.

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]
 
B

Bob Barrows [MVP]

Evertjan. said:
[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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top