Solved

ODBC-DataSourceAdm...ASP and SQLserver7.0

Posted on 1998-12-01
6
180 Views
Last Modified: 2010-04-09
 Have installed MS SqlServer7.0 Beta 3
  Want to test how to access data in an Sql database with
  ASP-scripts.
  Have already made a testapplication using
  FrontPage (ASP), Access97 and VBScript...everything
  works fine within this appl.

  I want to do the following:
  - Create a database in MS Sql 7.0 similar to the
    previously created database in Access97.
    This is done.
  - Set up the nessesary settings in the ODBC Data Source
    Manager in Control panel so I can access the
    database.
    How do I do this??????
  - How do I access this database from within ASP ??????

   I use a stand alone PC, and windows95.
0
Comment
Question by:erot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
ID: 1840139
1. ODBC

This is based on Windows NT SQL 6.5

- Open ODBC Data Souce Administrator in Control Panel
- select System DSN
- click "Add"
- choose SQL server
- click finish

- give it a name, remember it ! (description is not needed)
- choose local server
- (next)
- choose SQL authentication, username/password what is needed

- use default options for the rest


2. ASP
Probably in the global.asa of your application, the DNS source is mentioned. Change that to the new database:

something like:

"DSN=Your_DSN;SERVER=local;UID=sa;PWD=;APP=;DATABASE=Master"


0
 

Author Comment

by:erot
ID: 1840140
To Sybe... what is global.asa and where do I find it.

pnt. one worked out well.

Erot/Norway
0
 
LVL 28

Expert Comment

by:sybe
ID: 1840141
most ASP applications have a file called "global.asa", which sets global variables. The file must be in the root of the application.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:erot
ID: 1840142
Could not find any info on "global.asa".

Tried to do the following which works fine when accessing an
 access database:

  set conn = Server.CreateObject("ADODB.Connection")
  conn.open "DSN=Tore", "", ""
  set rs = server.CreateObject("ADODB.recordset")
  strSql = "Select FirstName from Person"
  rs.open strSql, conn, 3, 3

  have also tried different versions  with the conn.open:
  conn.open "DSN=Tore", "UID=sa", ""
  conn.open "DSN=Tore", "UID=sa", "PWD="

  should it not be possible to do it this way????


 
0
 

Author Comment

by:erot
ID: 1840143
Forgot to tell you that the code above give no errors.

0
 

Author Comment

by:erot
ID: 1840144
Found out how it works....

  conn.open "DSN=NameOfDsn;UID=sa;PWD="   works well.

 Thank you..

 Erot/Norway

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question