Uploading the DSN file

Results 1 to 3 of 3

Thread: Uploading the DSN file

  1. #1
    Join Date
    Dec 1969

    Default Uploading the DSN file

    Hello,<BR> I posted this question 2 days before in ASP message Board,but the question i asked was not understood and it was confusing, so i will put it in this way.<BR> I have created an asp page which is connected to an access database through a DSN connection. it is working proper in local. i have to upload all the files to a remote server and i have done the same but it is not recougnising the DSN name which i had given in the code because the DSN file is stored in the local system when it is created. so i want to know how do i come out of this problem and if i have to upload the DSN file which directory of the remote server should have this DSN file?<BR>can anyone help me in this regard?<BR><BR>thank you,<BR>Keerthi

  2. #2
    Anton Bawab Guest

    Default RE: Uploading the DSN file

    I&#039ve just been playing with DSN files. Learnt a lot I must admit.<BR><BR>So, you will have to create a FileDSN (if you haven&#039t). You can place that file (something.dsn) in the same folder as your application.<BR><BR>Before uploading the file, open it in notepad and edit the values pointing to the path of the database file. They will have to reflect the actual location on your server.<BR><BR>Then in your code, when you point to the DSN file, mappath it first :<BR>eg: objCommand.ActiveConnection = "FileDSN=" & Server.Mappath("something.dsn")<BR><BR>Hope that works,<BR>Anton.

  3. #3
    Join Date
    Dec 1969

    Default RE: Uploading the DSN file

    When you call your database to insert information you do this.<BR><BR>SQLDataInsertionString = "INSERT INTO tbl_Software (HardwareID,Software1, Software8,Software9)" & _<BR>"VALUES (?,?,?,?)<BR><BR><BR>Then when you are actually putting the information in you do this.<BR><BR>&#039 ########## Open the database #############<BR><BR>DatabaseConnection.Open "FILEDSN=Hardware"<BR><BR>My database is named hardware and has a table in it named tbl_Software. Tell me if this helps! taztrbl@hotmail.com<BR>I can give you an entire example if not.

Posting Permissions

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