Ask a Question related to ASP Database, Design and Development.
-
Ray at #1
Re: Problem connecting to an access database from an asp
Stupid question: Does this page have a .asp extension?
Ray at home
"Kathryn" <andania1@hotmail.com> wrote in message
news:42947ac.0308120137.70cab179@posting.google.co m...>
> <SCRIPT language = VBSCRIPT RUNAT="server">
> function UpdateDataBase()
> set cn=Server.CreateObject("ADODB.Connection")
>
> Calling the script isn't the problem, it gets into this script but I
> get the message "Object Expected" at runtime. The line it is
> complaining about is the Server.CreateObject.
Ray at Guest
-
please help connecting to access database
i'm trying to connect to an access database on an asp ready server. i know the ftp login information - does that apply to logging into the database... -
Problem connecting to local Access database - Unable to open registry key 'Temporary (volatile) Jet DSN ...
Hi I get the following error sporadically when running a sample in an MSDN ASP tutorial: Microsoft OLE DB Provider for ODBC Drivers: General... -
Connecting to MS Access Database
Hello, Do you know any free Director Xtra to connect to an access database? Thanx for help. -
Connecting to an MS Access Database
Hello, Do you know any free Director Xtra to connect to an access database? Thanx for help. -
connecting to access database
How can we connect microsoft access database(*.mdb) or excel(*.xls) with php? What are the codes which achieve this? ... -
Aaron Bertrand - MVP #2
Re: Problem connecting to an access database from an asp
> I have a problem which I'm beginning to think is something to do with
How are you accessing the file? [url]http://localhost/path/file.asp[/url] or> my installation or set up of Microsoft Personal Web Server. I have an
> ASP front end to an access database from which I'm calling the
> following script
c:\inetpub\wwwroot\path\file.asp? The latter won't work, ASP has to be
processed by the web server, and to do so you need to access it via the
http:// protocol...
Aaron Bertrand - MVP Guest
-
Bite My Bubbles #3
Re: Problem connecting to an access database from an asp
what is this line?
cn.Open "RunSettings"
why don't you make it
cn.Open RunSettings
"Kathryn" <andania1@hotmail.com> wrote in message
news:42947ac.0308120137.70cab179@posting.google.co m...> I hope this is the correct group to post this to!
>
> I have a problem which I'm beginning to think is something to do with
> my installation or set up of Microsoft Personal Web Server. I have an
> ASP front end to an access database from which I'm calling the
> following script
>
> <SCRIPT language = VBSCRIPT RUNAT="server">
> function UpdateDataBase()
> Dim cn
> Dim rs
> Dim strSQL
>
> set cn=Server.CreateObject("ADODB.Connection")
> cn.Open "RunSettings"
>
> strSQL = "INSERT INTO RunDetails(UserName) VALUES ('Fred')"
>
> cn.Execute strSQL
> end function
> </SCRIPT>
>
> Calling the script isn't the problem, it gets into this script but I
> get the message "Object Expected" at runtime. The line it is
> complaining about is the Server.CreateObject.
>
> At first I thought maybe the Microsoft ActiveX Data Objects wasn't
> installed on my machine but it is because if I put the code above into
> a VB program and run it within VB then it works.
>
> So, could this be something to do with my PWS setup?
>
> Any help would be appreciated as I'm beginning to pull my hair out!!
>
> Thanks.
>
> Kathryn.
Bite My Bubbles Guest
-
Bite My Bubbles #4
Re: Problem connecting to an access database from an asp
do you have ado installed on your computer?
Do you have a reference set in Global.asa to the ado library?
"Kathryn" <andania1@hotmail.com> wrote in message
news:42947ac.0308120137.70cab179@posting.google.co m...> I hope this is the correct group to post this to!
>
> I have a problem which I'm beginning to think is something to do with
> my installation or set up of Microsoft Personal Web Server. I have an
> ASP front end to an access database from which I'm calling the
> following script
>
> <SCRIPT language = VBSCRIPT RUNAT="server">
> function UpdateDataBase()
> Dim cn
> Dim rs
> Dim strSQL
>
> set cn=Server.CreateObject("ADODB.Connection")
> cn.Open "RunSettings"
>
> strSQL = "INSERT INTO RunDetails(UserName) VALUES ('Fred')"
>
> cn.Execute strSQL
> end function
> </SCRIPT>
>
> Calling the script isn't the problem, it gets into this script but I
> get the message "Object Expected" at runtime. The line it is
> complaining about is the Server.CreateObject.
>
> At first I thought maybe the Microsoft ActiveX Data Objects wasn't
> installed on my machine but it is because if I put the code above into
> a VB program and run it within VB then it works.
>
> So, could this be something to do with my PWS setup?
>
> Any help would be appreciated as I'm beginning to pull my hair out!!
>
> Thanks.
>
> Kathryn.
Bite My Bubbles Guest
-
Kathryn #5
Re: Problem connecting to an access database from an asp
Thanks for all of your replies, in answer to your questions:
Yes it does have a .asp extension.
Yes I do have ADO installed on my machine.
Yes I am calling it using [url]http://localhost[/url].....
With our without the quotes around the RunSettings it does the same
thing!
I'm beginning to think its me doing something stupid in the way I'm
calling the function! I have another asp file which has the input
fields on it and a button at the bottom to update the database. In the
onclick event in the button I call the function like
onclick="UpdateDataBase()". It obviously calls the function because
the error comes out of the function itself but maybe its not calling
it in the correct way? Any suggestions as to a better way to call it?
[email]andania1@hotmail.com[/email] (Kathryn) wrote in message news:<42947ac.0308120137.70cab179@posting.google.c om>...> I hope this is the correct group to post this to!
>
> I have a problem which I'm beginning to think is something to do with
> my installation or set up of Microsoft Personal Web Server. I have an
> ASP front end to an access database from which I'm calling the
> following script
>
> <SCRIPT language = VBSCRIPT RUNAT="server">
> function UpdateDataBase()
> Dim cn
> Dim rs
> Dim strSQL
>
> set cn=Server.CreateObject("ADODB.Connection")
> cn.Open "RunSettings"
>
> strSQL = "INSERT INTO RunDetails(UserName) VALUES ('Fred')"
>
> cn.Execute strSQL
> end function
> </SCRIPT>
>
> Calling the script isn't the problem, it gets into this script but I
> get the message "Object Expected" at runtime. The line it is
> complaining about is the Server.CreateObject.
>
> At first I thought maybe the Microsoft ActiveX Data Objects wasn't
> installed on my machine but it is because if I put the code above into
> a VB program and run it within VB then it works.
>
> So, could this be something to do with my PWS setup?
>
> Any help would be appreciated as I'm beginning to pull my hair out!!
>
> Thanks.
>
> Kathryn.Kathryn Guest
-
Alan #6
Re: Problem connecting to an access database from an asp
Yep, as William said, you're trying to call UpdateDataBase() on the
client-side, and it's a server-side routine. Post the form back and process
the input on the server.
Alan
"Kathryn" <andania1@hotmail.com> wrote in message
news:42947ac.0308130021.7569ae2b@posting.google.co m...news:<42947ac.0308120137.70cab179@posting.google.c om>...> Thanks for all of your replies, in answer to your questions:
>
> Yes it does have a .asp extension.
> Yes I do have ADO installed on my machine.
> Yes I am calling it using [url]http://localhost[/url].....
> With our without the quotes around the RunSettings it does the same
> thing!
>
> I'm beginning to think its me doing something stupid in the way I'm
> calling the function! I have another asp file which has the input
> fields on it and a button at the bottom to update the database. In the
> onclick event in the button I call the function like
> onclick="UpdateDataBase()". It obviously calls the function because
> the error comes out of the function itself but maybe its not calling
> it in the correct way? Any suggestions as to a better way to call it?
>
>
>
> [email]andania1@hotmail.com[/email] (Kathryn) wrote in message> > I hope this is the correct group to post this to!
> >
> > I have a problem which I'm beginning to think is something to do with
> > my installation or set up of Microsoft Personal Web Server. I have an
> > ASP front end to an access database from which I'm calling the
> > following script
> >
> > <SCRIPT language = VBSCRIPT RUNAT="server">
> > function UpdateDataBase()
> > Dim cn
> > Dim rs
> > Dim strSQL
> >
> > set cn=Server.CreateObject("ADODB.Connection")
> > cn.Open "RunSettings"
> >
> > strSQL = "INSERT INTO RunDetails(UserName) VALUES ('Fred')"
> >
> > cn.Execute strSQL
> > end function
> > </SCRIPT>
> >
> > Calling the script isn't the problem, it gets into this script but I
> > get the message "Object Expected" at runtime. The line it is
> > complaining about is the Server.CreateObject.
> >
> > At first I thought maybe the Microsoft ActiveX Data Objects wasn't
> > installed on my machine but it is because if I put the code above into
> > a VB program and run it within VB then it works.
> >
> > So, could this be something to do with my PWS setup?
> >
> > Any help would be appreciated as I'm beginning to pull my hair out!!
> >
> > Thanks.
> >
> > Kathryn.
Alan Guest
-
William Tasso #7
Re: Problem connecting to an access database from an asp
Kathryn wrote:
onclick is a client-side event.> I call the function like
> onclick="UpdateDataBase()". It obviously calls the function because
> the error comes out of the function itself but maybe its not calling
> it in the correct way? Any suggestions as to a better way to call it?
>
UpdateDataBase presumably needs to run on the server.
--
William Tasso - [url]http://WilliamTasso.com[/url]
William Tasso Guest
-
William Tasso #8
Re: Problem connecting to an access database from an asp
Alan wrote:
Thanks Alan, I've fixed the time setting on my workstation now ;o)> as William said,
It marks time with a local server on boot-up, but it's old and it drifts -
only noticable after a week or two.
--
William Tasso - [url]http://WilliamTasso.com[/url]
William Tasso Guest



Reply With Quote

