implementation of .asp script on internet web serv

Results 1 to 2 of 2

Thread: implementation of .asp script on internet web serv

  1. #1

    Default implementation of .asp script on internet web serv

    i have an asp script which connects to a database in dBase and displays the content of one fields of the database. this works fine in the PWS (personal web server available in win98se cd) on my PC. i keep the .asp file and the dBase file in the same folder and it works. <BR> it seems that when it comes to implementation on the internet web server it seems to be a different story. i tried to do the same thing on the internet web server. the internet web server is Linux based OS with the ability to exeucte .asp scripts. i put both the files ( the .asp file and the .dbf file ) in the folder where the .htm files are kept and tried to access the .asp file through the web browsers address bar. I get the responses "http 403 Forbidden". <BR> is there a role of the server administrator to do something on the web server so that my .asp script works and that the .asp script connects to the database? <BR> incase you are interested in the .asp file, the contents are as follows:<BR>-------------------------------------------------------------------------------------------------------------------------------<BR>&#060;%<BR>mysql="select * from class.dbf"<BR>set con = server.createobject("adodb.Connection")<BR>InitCat Path=server.mappath("local")<BR> ppath("class.dbf")<BR>Con.Open "Provider=MSDASQL.1;Data Source=dBASE Files;Location=filepath;Mode=Read;Initial Catalog=" & InitCatPath<BR>set rs=con.execute (mysql)<BR>while not rs.eof<BR> response.write rs("sname")&"<BR>"<BR> rs.movenext<BR>wend<BR>con.close<BR>%&#062;<BR>-----------------------------------------------------------------------------------------------------------------------------------<BR><BR> in the dBase file named "class.dbf", has a fieldname "sname" and contains a couple of names.<BR>both the files are in "g:local\" folder.<BR>-----------------------------------------------------------------------------------------------------------------------------------<BR><BR>i am connected to msn messanger as &#039;; and yahoo messanger as &#039;;, i would be nice if you could chat with me.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Which ASP engine?

    Are you using ChiliSoft ASP?<BR><BR>Anyway, the problem is in your provider string: "Provider=MSDASQL.1"<BR><BR>After all, the "MS" in there means "MicroSoft", and I guarantee you that there are no Microsoft database drivers running on a Linux machine!<BR><BR>You need to find out what the right string to use there is. Sorry I don&#039;t know what to use for .dbf files, but I think that some of the examples in the ChiliSoft "caspsamp" directory use .dbf files, so you might be able to clone what they do. If you don&#039;t have access to the full system on that Linux machine, you can get to the docs and/or the samples at the Chilisoft web site: and<BR><BR>Here&#039;s what I found in the docs:<BR><BR>Look in chapter 4 and then navigate to these sections:<BR><BR>Chili!Soft ASP Docs =&#062; Chapter 4: Building a Chili!Soft ASP Application =&#062; Connecting to a Database =&#062; Creating Connection Strings =&#062;<BR><BR>****** QUOTE ******<BR><BR>Syntax for DSN-less Connection Strings<BR>The following table lists the parameters to define and the syntax to use for each type of database in DSN-less connection strings. <BR><BR>dBase 5<BR> connect_string = "Driver={Dbase}; DBQ=[pathname]; defaultDir=[default_directory]"<BR><BR>where [pathname] is the absolute path name of the directory containing the database file and [default_directory] is the default directory for the database<BR> <BR>********* END QUOTE ********<BR><BR>So it *looks* like you need<BR><BR>Con.Open "Driver={Dbase}; DBQ=" & InitCatPath & "; defaultDir=" & InitCatPath<BR><BR>but I&#039;m not sure in DBQ and defaultDir get the same values. Play with it, I&#039;d say.<BR><BR>FINALLY...<BR><BR>There is *NO WAY* that you could be running on Linux and have a "folder" (directory) named "G:local\" !!! Don&#039;t even *think* about trying to use drive letters and colons and backslash characters on Linux!<BR><BR><BR>

Posting Permissions

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