How to up load Sql server data base on web


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: How to up load Sql server data base on web

  1. #1
    Gourav Sharma Guest

    How to up load Sql server data base on web


    Hi Dear,

    I am working on ASP and SQL Server 7.0. I want to know about how to up load
    my Sql Databse on web server .


    Gourav Sharma
    Ebot Technosoft Ltd.

  2. #2
    Sekhar Raj Guest

    Re: How to up load Sql server data base on web


    Hi Gourav

    Try this link.
    http://www.activeserverpages.com/learn/dbsimple.asp

    This has the example you are looking for.

    You may also want to try this link for reference
    http://www.asp101.com/links/index.asp


    Sekhar Rathinaraj
    Consultant
    Kforce.com



    "Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >
    >Hi Dear,
    >
    >I am working on ASP and SQL Server 7.0. I want to know about how to up load
    >my Sql Databse on web server .
    >
    >
    >Gourav Sharma
    >Ebot Technosoft Ltd.



  3. #3
    Matt Reitzel Guest

    Re: How to up load Sql server data base on web


    "Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >
    >Hi Dear,
    >
    >I am working on ASP and SQL Server 7.0. I want to know about how to up load
    >my Sql Databse on web server .
    >
    >
    >Gourav Sharma
    >Ebot Technosoft Ltd.



  4. #4
    Matt Reitzel Guest

    Re: How to up load Sql server data base on web


    I like to use DSN-less connections.
    In global.asa (using IIS, of course), declare an Application variable

    Application("DataConnection") = "Server=servername;Database=dbname;UID=dbusername;PWD=password;Driver={SQL
    Server};"
    then on the necessary page:
    create ODBC Connection
    Set DBConn = Server.CreateObject("ADODB.Connection")
    DBConn.ConnectionString = Application("DataConnection")
    DBConn.Open
    and just use the Execute method to get the data
    Set DataRS = ODBC.Execute("Place sql query here")
    If not DataRS.EOF then
    End IF







    "Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >
    >Hi Dear,
    >
    >I am working on ASP and SQL Server 7.0. I want to know about how to up load
    >my Sql Databse on web server .
    >
    >
    >Gourav Sharma
    >Ebot Technosoft Ltd.



  5. #5
    RB Guest

    Re: How to up load Sql server data base on web


    I think that the point is being missed --

    1. He wants to upload SQL server datbase to the web, I think -- from a local
    system to web. I'd sure like to see this also.

    2. The sample below says it is making an ODBC connection, but it is not:
    it is using the native ADO driver, and it's a good thing, because SQL Server
    7 has a native ADO driver that is far more efficient and provides enhanced
    capabilities over ODBC.

    -rb

    "Matt Reitzel" <mreitzel@siebel.com> wrote:
    >
    >I like to use DSN-less connections.
    >In global.asa (using IIS, of course), declare an Application variable
    >
    >Application("DataConnection") = "Server=servername;Database=dbname;UID=dbusername;PWD=password;Driver={SQL
    >Server};"
    >then on the necessary page:
    >create ODBC Connection
    >Set DBConn = Server.CreateObject("ADODB.Connection")
    >DBConn.ConnectionString = Application("DataConnection")
    >DBConn.Open
    >and just use the Execute method to get the data
    >Set DataRS = ODBC.Execute("Place sql query here")
    >If not DataRS.EOF then
    >End IF
    >
    >
    >
    >
    >
    >
    >
    >"Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >>
    >>Hi Dear,
    >>
    >>I am working on ASP and SQL Server 7.0. I want to know about how to up

    load
    >>my Sql Databse on web server .
    >>
    >>
    >>Gourav Sharma
    >>Ebot Technosoft Ltd.

    >



  6. #6
    Tom McDonald keane.com Guest

    Re: How to up load Sql server data base on web


    Hey All,

    I think there is some mistake. All of the posts to this point have discussed
    how to get a recordset from a SQL Server DB on the web server. I don't think
    that was the intent of the topic. We are supposed to be talking about UPLOADING
    DBs to the web server.

    I have some experience uploading. It is a royal pain in the ***!

    Using SQL 7.0) You have to back up your database to a .dat file. Then,
    you have to upload your .dat file to the web site server. Next, you have
    to write a text batch file as follows:

    1. Open Notepad (or another text editor).
    2. Type the following (you will have to customize for your situation):

    Restore Database nwind_test
    From Disk='c:\windows\desktop\northwindcs1.dat'
    With Move 'northwindcs' To 'c:\windows\desktop\nwind_test.mdf',
    Move 'northwindcs_log' To 'c:\windows\desktop\nwind_test.ldf'

    Where the syntax of the statement above is

    Restore Database <name of the original database on SQL SERVER>
    From Disk=<path to the .dat file created when you uploaded your .dat> With
    Move <name of the original database> To <path of your choice, new location
    for the .mdf file>, Move <name of the log file for the original database,
    probably DatabaseName_log>

    3. Save the file as restore.txt, then upload it to your IHP
    4. Open a DOS prompt.(at your IHP's server). This is where you need assistance
    from somebody at your IHP. Somebody on the IHP end has to do the following
    steps.
    5. Type the following at the C prompt

    osql -S (local) -U SA -P

    *****It is case sensitive.

    6. Type the following at the prompt 1>

    :r c:\scratch\restore.txt
    ('c:\scratch' is the new location of restore.txt file at the IHP)

    7. Type the following at the prompt 2>

    go

    8. You should get something similar to the following:

    Processed 104 pages for database 'testsql', file 'TestSQL_dat' on file 1.
    Processed 1 pages for database 'testsql', file 'TestSQL_log' on file 1.
    Backup or restore operation successfully processed 105 pages in 0.133 seconds
    (6.413 MB/sec).

    1>quit



    "RB" <rb@sts1.com> wrote:
    >
    >I think that the point is being missed --
    >
    >1. He wants to upload SQL server datbase to the web, I think -- from a local
    >system to web. I'd sure like to see this also.
    >
    >2. The sample below says it is making an ODBC connection, but it is not:
    > it is using the native ADO driver, and it's a good thing, because SQL Server
    >7 has a native ADO driver that is far more efficient and provides enhanced
    >capabilities over ODBC.
    >
    >-rb
    >
    >"Matt Reitzel" <mreitzel@siebel.com> wrote:
    >>
    >>I like to use DSN-less connections.
    >>In global.asa (using IIS, of course), declare an Application variable
    >>
    >>Application("DataConnection") = "Server=servername;Database=dbname;UID=dbusername;PWD=password;Driver={SQL
    >>Server};"
    >>then on the necessary page:
    >>create ODBC Connection
    >>Set DBConn = Server.CreateObject("ADODB.Connection")
    >>DBConn.ConnectionString = Application("DataConnection")
    >>DBConn.Open
    >>and just use the Execute method to get the data
    >>Set DataRS = ODBC.Execute("Place sql query here")
    >>If not DataRS.EOF then
    >>End IF
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>"Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >>>
    >>>Hi Dear,
    >>>
    >>>I am working on ASP and SQL Server 7.0. I want to know about how to up

    >load
    >>>my Sql Databse on web server .
    >>>
    >>>
    >>>Gourav Sharma
    >>>Ebot Technosoft Ltd.

    >>

    >



  7. #7
    Jeannine Guest

    Re: How to up load Sql server data base on web


    Gourav,
    First of all do you basically want to take the data that you have in an existing
    MS SQL 7.0 dB and move the data onto the O'reilly product "MYSQL"? If so
    I think it should be much simpiler than everything so far.

    I have worked with a number of Database Management Systems, i.e. MS SQL,
    DB2, Sybase etc. and uploading data from one DBMS to another is usually done
    via exporting a flat file from your source tables and uploading that to your
    destination tables in the other DBMS. I would suggest determining the format
    in which MYSQL will load files. Try going to the O'reilly web site, www.oreilly.com
    and getting more information about "MYSQL". They have a book you can get
    on MYSQL titled, MySQL & mSQL.

    Let me know if this is what you are trying to do.

    -Jeannine
    "Tom McDonald keane.com" <tomandlis@hotmail.com> wrote:
    >
    >Hey All,
    >
    >I think there is some mistake. All of the posts to this point have discussed
    >how to get a recordset from a SQL Server DB on the web server. I don't

    think
    >that was the intent of the topic. We are supposed to be talking about UPLOADING
    >DBs to the web server.
    >
    >I have some experience uploading. It is a royal pain in the ***!
    >
    >Using SQL 7.0) You have to back up your database to a .dat file. Then,


    >you have to upload your .dat file to the web site server. Next, you have
    >to write a text batch file as follows:
    >
    >1. Open Notepad (or another text editor).
    >2. Type the following (you will have to customize for your situation):
    >
    >Restore Database nwind_test
    >From Disk='c:\windows\desktop\northwindcs1.dat'
    >With Move 'northwindcs' To 'c:\windows\desktop\nwind_test.mdf',
    >Move 'northwindcs_log' To 'c:\windows\desktop\nwind_test.ldf'
    >
    >Where the syntax of the statement above is
    >
    >Restore Database <name of the original database on SQL SERVER>
    >From Disk=<path to the .dat file created when you uploaded your .dat> With
    >Move <name of the original database> To <path of your choice, new location
    >for the .mdf file>, Move <name of the log file for the original database,
    >probably DatabaseName_log>
    >
    >3. Save the file as restore.txt, then upload it to your IHP
    >4. Open a DOS prompt.(at your IHP's server). This is where you need assistance
    >from somebody at your IHP. Somebody on the IHP end has to do the following
    >steps.
    >5. Type the following at the C prompt
    >
    >osql -S (local) -U SA -P
    >
    >*****It is case sensitive.
    >
    >6. Type the following at the prompt 1>
    >
    >:r c:\scratch\restore.txt
    >('c:\scratch' is the new location of restore.txt file at the IHP)
    >
    >7. Type the following at the prompt 2>
    >
    >go
    >
    >8. You should get something similar to the following:
    >
    >Processed 104 pages for database 'testsql', file 'TestSQL_dat' on file 1.
    > Processed 1 pages for database 'testsql', file 'TestSQL_log' on file 1.
    > Backup or restore operation successfully processed 105 pages in 0.133 seconds
    >(6.413 MB/sec).
    >
    >1>quit
    >
    >
    >
    >"RB" <rb@sts1.com> wrote:
    >>
    >>I think that the point is being missed --
    >>
    >>1. He wants to upload SQL server datbase to the web, I think -- from a

    local
    >>system to web. I'd sure like to see this also.
    >>
    >>2. The sample below says it is making an ODBC connection, but it is not:
    >> it is using the native ADO driver, and it's a good thing, because SQL

    Server
    >>7 has a native ADO driver that is far more efficient and provides enhanced
    >>capabilities over ODBC.
    >>
    >>-rb
    >>
    >>"Matt Reitzel" <mreitzel@siebel.com> wrote:
    >>>
    >>>I like to use DSN-less connections.
    >>>In global.asa (using IIS, of course), declare an Application variable
    >>>
    >>>Application("DataConnection") = "Server=servername;Database=dbname;UID=dbusername;PWD=password;Driver={SQL
    >>>Server};"
    >>>then on the necessary page:
    >>>create ODBC Connection
    >>>Set DBConn = Server.CreateObject("ADODB.Connection")
    >>>DBConn.ConnectionString = Application("DataConnection")
    >>>DBConn.Open
    >>>and just use the Execute method to get the data
    >>>Set DataRS = ODBC.Execute("Place sql query here")
    >>>If not DataRS.EOF then
    >>>End IF
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>"Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >>>>
    >>>>Hi Dear,
    >>>>
    >>>>I am working on ASP and SQL Server 7.0. I want to know about how to up

    >>load
    >>>>my Sql Databse on web server .
    >>>>
    >>>>
    >>>>Gourav Sharma
    >>>>Ebot Technosoft Ltd.
    >>>

    >>

    >



  8. #8
    Monir Guest

    Re: How to up load Sql server data base on web


    I think the whole question is very ambigious. The Databse Server and web server
    both are two different thing and serves two different purpose.

    Database to store the data as usual.
    Web server I dont think it need explaining what it is.

    You need to certain about what you want to do. If you want to view the data
    from the database through the webserver then using ADO solution is already
    given.

    ONe of us given a solution about to backup and restore a database.

    I am sure they are two different thing.

    I think the question need more spefic and clear so that a correct advice
    or solution can be given.

    I hope none of us is offended by my email. That is never my intension.

    Best of lucks folks.

    Monir



    "Jeannine" <Jeannine.L.Varunok@aexp.com> wrote:
    >
    >Gourav,
    >First of all do you basically want to take the data that you have in an

    existing
    >MS SQL 7.0 dB and move the data onto the O'reilly product "MYSQL"? If so
    >I think it should be much simpiler than everything so far.
    >
    >I have worked with a number of Database Management Systems, i.e. MS SQL,
    >DB2, Sybase etc. and uploading data from one DBMS to another is usually

    done
    >via exporting a flat file from your source tables and uploading that to

    your
    >destination tables in the other DBMS. I would suggest determining the format
    >in which MYSQL will load files. Try going to the O'reilly web site, www.oreilly.com
    >and getting more information about "MYSQL". They have a book you can get
    >on MYSQL titled, MySQL & mSQL.
    >
    >Let me know if this is what you are trying to do.
    >
    >-Jeannine
    >"Tom McDonald keane.com" <tomandlis@hotmail.com> wrote:
    >>
    >>Hey All,
    >>
    >>I think there is some mistake. All of the posts to this point have discussed
    >>how to get a recordset from a SQL Server DB on the web server. I don't

    >think
    >>that was the intent of the topic. We are supposed to be talking about

    UPLOADING
    >>DBs to the web server.
    >>
    >>I have some experience uploading. It is a royal pain in the ***!
    >>
    >>Using SQL 7.0) You have to back up your database to a .dat file. Then,

    >
    >>you have to upload your .dat file to the web site server. Next, you have
    >>to write a text batch file as follows:
    >>
    >>1. Open Notepad (or another text editor).
    >>2. Type the following (you will have to customize for your situation):
    >>
    >>Restore Database nwind_test
    >>From Disk='c:\windows\desktop\northwindcs1.dat'
    >>With Move 'northwindcs' To 'c:\windows\desktop\nwind_test.mdf',
    >>Move 'northwindcs_log' To 'c:\windows\desktop\nwind_test.ldf'
    >>
    >>Where the syntax of the statement above is
    >>
    >>Restore Database <name of the original database on SQL SERVER>
    >>From Disk=<path to the .dat file created when you uploaded your .dat> With
    >>Move <name of the original database> To <path of your choice, new location
    >>for the .mdf file>, Move <name of the log file for the original database,
    >>probably DatabaseName_log>
    >>
    >>3. Save the file as restore.txt, then upload it to your IHP
    >>4. Open a DOS prompt.(at your IHP's server). This is where you need assistance
    >>from somebody at your IHP. Somebody on the IHP end has to do the following
    >>steps.
    >>5. Type the following at the C prompt
    >>
    >>osql -S (local) -U SA -P
    >>
    >>*****It is case sensitive.
    >>
    >>6. Type the following at the prompt 1>
    >>
    >>:r c:\scratch\restore.txt
    >>('c:\scratch' is the new location of restore.txt file at the IHP)
    >>
    >>7. Type the following at the prompt 2>
    >>
    >>go
    >>
    >>8. You should get something similar to the following:
    >>
    >>Processed 104 pages for database 'testsql', file 'TestSQL_dat' on file

    1.
    >> Processed 1 pages for database 'testsql', file 'TestSQL_log' on file 1.
    >> Backup or restore operation successfully processed 105 pages in 0.133

    seconds
    >>(6.413 MB/sec).
    >>
    >>1>quit
    >>
    >>
    >>
    >>"RB" <rb@sts1.com> wrote:
    >>>
    >>>I think that the point is being missed --
    >>>
    >>>1. He wants to upload SQL server datbase to the web, I think -- from a

    >local
    >>>system to web. I'd sure like to see this also.
    >>>
    >>>2. The sample below says it is making an ODBC connection, but it is not:
    >>> it is using the native ADO driver, and it's a good thing, because SQL

    >Server
    >>>7 has a native ADO driver that is far more efficient and provides enhanced
    >>>capabilities over ODBC.
    >>>
    >>>-rb
    >>>
    >>>"Matt Reitzel" <mreitzel@siebel.com> wrote:
    >>>>
    >>>>I like to use DSN-less connections.
    >>>>In global.asa (using IIS, of course), declare an Application variable
    >>>>
    >>>>Application("DataConnection") = "Server=servername;Database=dbname;UID=dbusername;PWD=password;Driver={SQL
    >>>>Server};"
    >>>>then on the necessary page:
    >>>>create ODBC Connection
    >>>>Set DBConn = Server.CreateObject("ADODB.Connection")
    >>>>DBConn.ConnectionString = Application("DataConnection")
    >>>>DBConn.Open
    >>>>and just use the Execute method to get the data
    >>>>Set DataRS = ODBC.Execute("Place sql query here")
    >>>>If not DataRS.EOF then
    >>>>End IF
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>"Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >>>>>
    >>>>>Hi Dear,
    >>>>>
    >>>>>I am working on ASP and SQL Server 7.0. I want to know about how to

    up
    >>>load
    >>>>>my Sql Databse on web server .
    >>>>>
    >>>>>
    >>>>>Gourav Sharma
    >>>>>Ebot Technosoft Ltd.
    >>>>
    >>>

    >>

    >



  9. #9
    Girish Deshpande Guest

    Re: How to up load Sql server data base on web


    I am giving one *fictitious sample* here to retrieve the data,
    I usually use command object in ADO for update/delete/insert. Looks more
    professional that way.
    '************ my.asp ******
    Dim cnn
    dim rs
    dim sql
    sql = "select * from authors"
    set cnn = server.createobject("ADODB.Connection")

    with cnn
    .Provider = "sqloledb"
    .properties("Data Source").value = "DESHPANDE" 'Name of the
    server
    .properties("Initial Catalog").value = "pubs" 'Database name
    .properties("User ID").value = "sa"
    .properties("Password").value = "sa1"
    .open
    set rs = .execute(sql)
    end with

    do while NOT rs.EOF loop
    response.write(rs("name"))
    response.write(rs("address"))
    response.write("<BR>")
    rs.MoveNext
    end loop
    'close connection, recordset etc
    rs.close
    cnn.close
    set rs = nothing
    set cnn = nothing

    '********* end of my.asp ********
    And one more thing... I won't recommend putting connection information in
    Global.asa if you are doing professional work accessing real business data.
    It is so convinient for hackers to get all the info they need to access your
    database.

    If possible use VB COM objects to keep all such things. Helps maintain the
    system.
    Happy Programming
    Girish

    "Gourav Sharma" <gouravs@ebotsoft.com> wrote:
    >
    >Hi Dear,
    >
    >I am working on ASP and SQL Server 7.0. I want to know about how to up load
    >my Sql Databse on web server .
    >
    >
    >Gourav Sharma
    >Ebot Technosoft Ltd.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center