PDA

Click to See Complete Forum and Search --> : Access & SQL


dndstef
May 31st, 2000, 03:38 AM
I'm new to programming and i use mainly VB.

I have created a small application that access an Acess97
database, i want to export this application to internet
by creating an ActiveX. But someone told me that i would
need to put my database on a SQL server and set my ocx to
contac the SQL server.

I know about SQL query but i don't know anything about
SQL Servers, can i just put my Access97 database and
set my ActiveX to contact the server SQL or is it more
complicated than that.

Can someone explain to me how it can be done without
to much modification.

thanks!

May 31st, 2000, 07:20 AM
if you are not expecting too many hits, Access97 will do the job.

dndstef
May 31st, 2000, 10:14 AM
Well i just add new and access the records, i dont even
delete records.

So you tell me that i just need to put my database on the
SQL Server. Right? And access to the SQL Server with ADO?

Is that Right?

JasonGS
May 31st, 2000, 01:13 PM
You can connect to your Access database through "...Dbq=file.mdb" or and ODBC connection, but those are limited to your local computer. ActiveX runs client side and therefore they could not access a local connection like an ODBC, a SQL server will allow applications to connect to your database remotley over the Internet or on a network.

But you can write your ActiveX program and use ado like this...

' This is prob. similar to what you do now...
adoConn.Open "Driver={Microsoft Access Driver (*.mdb)}; Dbq=myfile.mdb;"

' This would connect you to a SQL server...
adoConn.Open "Driver={SQL Server}; Server=MICKEYMOUSE; Database=sql_dbname;", sql_Username, sql_Password

Access isn't really meant for more than a couple people, SQL server would probably be your answer for a multiuser application.

Hope this helps...

Clunietp
May 31st, 2000, 01:14 PM
you don't HAVE to use SQL Server. Like Sascha said, it's fine for low volume web sites.

You will, however, have to use ADO to manipulate your database. DAO is not designed for use on web servers

dndstef
May 31st, 2000, 07:49 PM
Ok! So this left me with Two Question?

How do i connect to my access97 database through
internet or my intranet?

And how do i create a SQL database?

Thanks a lot!

Clunietp
May 31st, 2000, 10:32 PM
SQL database? Are you using MS Access or SQL server? Are you using active server pages?

if you don't know what I'm talking about, you've got your work cut out for you :)

dndstef
May 31st, 2000, 11:43 PM
Ok i will explain more clearly.

I have an ActiveX => ActiveX.ocx
On my Web Page => WebPage.htm
The ActiveX connect to my Access97 Database => Database.mdb
Say my Webpage URL is => http://www.server.com/mywebpage/

And i want to be able to see over the Internet my
ActiveX component with the data from the database
by going to my webpage URL.
I'm not using ASP nor SQL Server!

There wil not be many record in the database.

You see (in my activeX) when i put a relative path like =

\dbdirectory\Database.mdb

It doesn't work because i wanted to put the databse in a
directory on my web site.

So anyone got code for that?

Or should i start to learn ASP programming and unhappily
restart all this over.


Sorry for the confusion, i'm not use to speak english.

Clunietp
Jun 1st, 2000, 11:28 AM
yuck!

You want to put your database on your web server and have your fat clients manipulate it? You'll need to use RDS or RDO to get the database over port 80 (as your web server will block the normal file sharing port), and have your client have all the necessary files on their system in order to work with the database.

A better solution would be to use ASP. You'll have a much thinner client, browser independance, and much better security and data integrity

Just my 2 cents

Tom

dndstef
Jun 1st, 2000, 12:23 PM
Ok With ASP! But i don't know the exact syntaxe in ASP to
access my database, please some code would be helpful.

I know a little bit of ASP but not about database connection.

But some pointers are welcome!

thanks

Jun 1st, 2000, 06:37 PM
it will also work with an ActiveX control, but you have to change design quite bit.

You will need an ActiveX DLL, that handles all data manipulation. your client OCX should only talk to the DLL
and not even know anything about your database.

first of all you should develop an ActiveX DLL, that retreives data from your MDB and writes to it. this DLL should be designed to run under MTS (comes with NT option pack), alternatively you can change your DLL to an ActiveX EXE (DCOM).

the ActiveX DLL should only send serialized data to the client OCX (Variant Arrays work nicely), so that the client doesn't need any database drivers.

anyway, a design with ASP (also consider using WebClasses) should be prefered for internet apps (maybe not for intranet).

good luck

Sascha