Results 1 to 11 of 11

Thread: Access & SQL

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    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!

  2. #2
    Guest
    if you are not expecting too many hits, Access97 will do the job.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67
    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?

  4. #4
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155
    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...
    Code:
    ' 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...

  5. #5
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  6. #6

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    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!

  7. #7
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  8. #8

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    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.


  9. #9
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  10. #10

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    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

  11. #11
    Guest
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width