|
 |
asp_ado_rds thread: ADODB.Record does not work
Message #1 by "robiyanto surya" <robiyantos@h...> on Tue, 12 Jun 2001 04:07:56
|
|
Does anyone know why the code below does not work ?
<%
Dim a
Set a = Server.CreateObject("ADODB.Record")
a.open "readme.txt","URL=http://localhost/c1"
set a = nothing
%>
When I run this script, the following error occurs:
Error Type:
Microsoft OLE DB Provider for Internet Publishing (0x80004005)
Unspecified error
/c1/upload.asp, line 17
nb: I'm using IIS5 on Windows 2000 server
robi
Message #2 by "Branimir Giurov" <branimir@n...> on Tue, 12 Jun 2001 13:42:38 +0300
|
|
Why dont you try like this:
<%
dim a
set a=Server.CreateObject("ADODB.Recordset")
.....
-----Original Message-----
From: robiyanto surya [mailto:robiyantos@h...]
Sent: Tuesday, June 12, 2001 4:08 AM
To: ASP_ADO_RDS
Subject: [asp_ado_rds] ADODB.Record does not work
Does anyone know why the code below does not work ?
<%
Dim a
Set a = Server.CreateObject("ADODB.Record")
a.open "readme.txt","URL=http://localhost/c1"
set a = nothing
%>
When I run this script, the following error occurs:
Error Type:
Microsoft OLE DB Provider for Internet Publishing (0x80004005)
Unspecified error
/c1/upload.asp, line 17
nb: I'm using IIS5 on Windows 2000 server
robi
Message #3 by "robiyanto surya" <robiyantos@h...> on Wed, 13 Jun 2001 02:02:29
|
|
thanks ,
it works. But, I want to create a record object, not a recordset object.
Do u have any idea?
robi
> Why dont you try like this:
> <%
> dim a
> set a=Server.CreateObject("ADODB.Recordset")
> .....
>
>
>
> -----Original Message-----
> From: robiyanto surya [mailto:robiyantos@h...]
> Sent: Tuesday, June 12, 2001 4:08 AM
> To: ASP_ADO_RDS
> Subject: [asp_ado_rds] ADODB.Record does not work
>
>
> Does anyone know why the code below does not work ?
>
> <%
> Dim a
> Set a = Server.CreateObject("ADODB.Record")
> a.open "readme.txt","URL=http://localhost/c1"
> set a = nothing
> %>
>
> When I run this script, the following error occurs:
>
> Error Type:
> Microsoft OLE DB Provider for Internet Publishing (0x80004005)
> Unspecified error
> /c1/upload.asp, line 17
>
> nb: I'm using IIS5 on Windows 2000 server
>
> robi
>
Message #4 by "srinivas" <srinivas@n...> on Tue, 12 Jun 2001 22:01:08 -0500
|
|
hello friend,
ur opening database or txt file.
if database
u must open *.mdb file.
and reacord set
try again
srinivas
Message #5 by martinez@t... on Wed, 13 Jun 2001 09:41:13
|
|
Hi,
I'm having a similar problem with the ADO Stream object (and Record
object). It seems that the URL keyword isn't mapped to the provider for
IP! I'm sure that the MSDAIPP.DSO OLE DB provider is installed. Does
anybody know what the solution could be!
> Does anyone know why the code below does not work ?
>
> <%
> Dim a
> Set a = Server.CreateObject("ADODB.Record")
> a.open "readme.txt","URL=http://localhost/c1"
> set a = nothing
> %>
>
> When I run this script, the following error occurs:
>
> Error Type:
> Microsoft OLE DB Provider for Internet Publishing (0x80004005)
> Unspecified error
> /c1/upload.asp, line 17
>
> nb: I'm using IIS5 on Windows 2000 server
>
Message #6 by "robiyanto surya" <robiyantos@h...> on Thu, 14 Jun 2001 01:54:25
|
|
I try to open a txt file. And I already make sure that the directory of
this file is accessable. I already tried some codes below and give me the
same error message.
code1:
<%
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRec = Server.CreateObject("ADODB.Record")
str = "provider=MSDAIPP.DSO;data source=" &_
"http://localhost/c1;User ID=administrator;Password=mypassword"
objConn.open str
objRec.open "readme.txt",objConn '--->Line 17
...
%>
code2:
<%
Set objRec2 = Server.CreateObject("ADODB.Recordset")
Set objRec = Server.CreateObject("ADODB.Record")
objRec2.open "","URL=http://localhost/c1"
objRec.open "readme.txt",objRec2 '--->Line 17
...
%>
code3:
<%
Set a = Server.CreateObject("ADODB.Record")
a.open "readme.txt","URL=http://localhost/c1" '--->Line 17
set a = nothing
%>
And The error is:
Error Type:
Microsoft OLE DB Provider for Internet Publishing (0x80004005)
Unspecified error
/c1/upload.asp, line 17
Robi
> hello friend,
> ur opening database or txt file.
> if database
> u must open *.mdb file.
> and reacord set
> try again
>
>
> srinivas
>
Message #7 by "srinivas" <srinivas@n...> on Wed, 13 Jun 2001 23:34:34 -0500
|
|
hai guy,
try this code,
this code is working.
thankx
srinivas
<%@ LANGUAGE=VBScript %>
<HTML>
<HEAD>
<TITLE>Manipulating Text Streams</TITLE>
</HEAD>
<BODY bgColor=#ffffff>
<H2><FONT face=Arial size=4 style="BACKGROUND-COLOR: #99ff00">
The FileSystemObject can be used to manipulate text streams. </FONT>
</H2>
<H3><FONT style="BACKGROUND-COLOR: #ccffff">Now creating
"TextFile.txt" ... </FONT>
</H3>
<%
Set FileStreamObject = CreateObject("Scripting.FileSystemObject")
Set WriteStream = _
FileStreamObject.CreateTextFile(Server.MapPath ("\TextFile.txt"), True)
WriteStream.WriteLine("Hello World!")
WriteStream.Close
%>
<H3><FONT style="BACKGROUND-COLOR: #ffff99">Now reading and
displaying the contents of "TextFile.txt" ... </FONT>
</H3>
<%
Set ReadStream = FileStreamObject.OpenTextFile
(Server.MapPath("\TextFile.txt"))
While not ReadStream.AtEndOfStream
Response.Write ReadStream.Readline
If not ReadStream.AtEndOfStream Then
ReadStream.SkipLine()
End If
Wend
Set ReadStream=Nothing
%>
<p></p>
<HR>
This Web page was generated on <%= Date %> at <%= Time %>.
</BODY>
</HTML>
Message #8 by "Massimo Preitano" <max@z...> on Thu, 14 Jun 2001 04:23:16
|
|
I've got exactly the same problem. Please guru, an answer...
> Does anyone know why the code below does not work ?
>
> <%
> Dim a
> Set a = Server.CreateObject("ADODB.Record")
> a.open "readme.txt","URL=http://localhost/c1"
> set a = nothing
> %>
>
> When I run this script, the following error occurs:
>
> Error Type:
> Microsoft OLE DB Provider for Internet Publishing (0x80004005)
> Unspecified error
> /c1/upload.asp, line 17
>
> nb: I'm using IIS5 on Windows 2000 server
>
|
|
 |