Ask a Question related to ASP Database, Design and Development.
-
Bob Barrows #1
Re: help with asp code
[url]http://www.aspfaq.com/show.asp?id=2109[/url]
Pets2adopt wrote:> The error i'm getting is the page will not load. it seams that any
> asp code that i'm dropping onto the server is not loading
>
> "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> news:#3#FmsePDHA.1380@TK2MSFTNGP11.phx.gbl...>> What errors?
>>
>> You should switch to the native Jet OLEDB provider instead of ODBC -
>> see [url]www.able-consulting.com/ado_conn.htm[/url] for examples.
>>
>> HTH,
>> Bob Barrows
>>
>> Pets2adopt wrote:>>> can anyone let me know why the code bellow is creating errors I'm
>>> trying to connect to a access data base then display the results of
>>> what's in the data base.
>>>
>>> thank you for any help that you can offer
>>>
>>>
>>>
>>> <%@ Language=VBSCRIPT %>
>>> <% Option Explicit %>
>>> <!--#include virtual="/adovbs.inc"-->
>>> <%
>>> 'create a connection to our database that contains the
>>>
>>> Dim objConn
>>> Set objConn = Server.CreateObject("ADODB.Connection")
>>> objConn.ConnectionString="Driver={Microsoft Access Driver
>>> (*.mdb)};" &_ "DBQ=K:\myweb3\fpdb\storesdb.mdb"
>>> objConn.Open
>>>
>>>
>>>
>>> ' create a recordset object
>>> Dim objRS
>>> Set objRS = Server.CreateObject("ADODB.Recordset")
>>>
>>> ' open the recordset
>>> objRS.Open "store_info", objConn, , , adCmdTable
>>>
>>>
>>>
>>> ' display the results
>>> Do While not objRS.EOF
>>> response.write "<B>" & objRS("City") & "</b><br>"
>>> response.write "<br>objRS("Store_Name") & "<BR>"
>>>
>>>
>>>
>>> ' move to the next record
>>> objRS.MoveNext
>>> Loop
>>>
>>> ' clean up !!
>>> objRS.Close
>>> set objRS = Nothing
>>>
>>> objConn.close
>>> set objConn = nothing
>>>
>>> %>
Bob Barrows Guest
-
Why doesn't the Code Completion occur in FlexBuilder IDEwhen source code is in an external file?
I am seperating my .as from the MXML by using the following in my file.mxml: <mx:Script source="file.as"> When I edit file.as, the code... -
How would I include the Open Browser code into this lineof code?
Hello and thankyou in advance: I have an ASP page linked to my database and I want to apply the Open Browser behaviour to the code. I have tried... -
Custom control fires event but ignores some code in the code behind file
I do not quite understand the question. I will merely point out that most programming problems happen for a reason. Code works the way it is... -
Custom tool warning: DiscoCodeGenerator unable to initialize code generator. No code generated.
I created a brand new WebService (HelloWorld) and when I attempt to add this WebService to a WindowsForm project I get the following error message in... -
Security problem with Managed Code calling Unmanaged Code in a Web Page
Hello, I have a web page which contains an ActiveX control (unmanaged) and a Windows Forms User Control (managed). Both reside on a web page and... -
Pets2adopt #2
Re: help with asp code
Thanks Bob I managed to get past most of my errors but I have one more
question for you or for the group.
I'm now getting the following error
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x4798 Thread 0x4670
DBC 0x2397adc Jet'.
/storesearch.asp, line 10
the new code is listed bellow
<%@ Language=VBSCRIPT %>
<% Option Explicit %>
<%
'create a connection to our database that contains the
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" &_
"DBQ=www.web/fpdb/storesdb.mdb"
objConn.Open
' create a recordset object
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
' open the recordset
objRS.Open "store_info", objConn, , , adCmdTable
' display the results
Do While not objRS.EOF
response.write "<B>" & objRS("City") & "</b><br>"
response.write "<br>" & objRS("Store_Name") & "<BR>"
' move to the next record
objRS.MoveNext
Loop
' clean up !!
objRS.Close
set objRS = Nothing
objConn.close
set objConn = nothing
%>
Any more help that you provide would be appreciated
"Bob Barrows" <reb_01501@yahoo.com> wrote in message
news:OzSWSKkPDHA.2036@TK2MSFTNGP10.phx.gbl...> [url]http://www.aspfaq.com/show.asp?id=2109[/url]
>
> Pets2adopt wrote:>> > The error i'm getting is the page will not load. it seams that any
> > asp code that i'm dropping onto the server is not loading
> >
> > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> > news:#3#FmsePDHA.1380@TK2MSFTNGP11.phx.gbl...> >> What errors?
> >>
> >> You should switch to the native Jet OLEDB provider instead of ODBC -
> >> see [url]www.able-consulting.com/ado_conn.htm[/url] for examples.
> >>
> >> HTH,
> >> Bob Barrows
> >>
> >> Pets2adopt wrote:
> >>> can anyone let me know why the code bellow is creating errors I'm
> >>> trying to connect to a access data base then display the results of
> >>> what's in the data base.
> >>>
> >>> thank you for any help that you can offer
> >>>
> >>>
> >>>
> >>> <%@ Language=VBSCRIPT %>
> >>> <% Option Explicit %>
> >>> <!--#include virtual="/adovbs.inc"-->
> >>> <%
> >>> 'create a connection to our database that contains the
> >>>
> >>> Dim objConn
> >>> Set objConn = Server.CreateObject("ADODB.Connection")
> >>> objConn.ConnectionString="Driver={Microsoft Access Driver
> >>> (*.mdb)};" &_ "DBQ=K:\myweb3\fpdb\storesdb.mdb"
> >>> objConn.Open
> >>>
> >>>
> >>>
> >>> ' create a recordset object
> >>> Dim objRS
> >>> Set objRS = Server.CreateObject("ADODB.Recordset")
> >>>
> >>> ' open the recordset
> >>> objRS.Open "store_info", objConn, , , adCmdTable
> >>>
> >>>
> >>>
> >>> ' display the results
> >>> Do While not objRS.EOF
> >>> response.write "<B>" & objRS("City") & "</b><br>"
> >>> response.write "<br>objRS("Store_Name") & "<BR>"
> >>>
> >>>
> >>>
> >>> ' move to the next record
> >>> objRS.MoveNext
> >>> Loop
> >>>
> >>> ' clean up !!
> >>> objRS.Close
> >>> set objRS = Nothing
> >>>
> >>> objConn.close
> >>> set objConn = nothing
> >>>
> >>> %>
>
>
Pets2adopt Guest
-
chippy #3
Re: help with asp code
Thanksfor the help Ken, it worked i'll try and change the code now to the
oledb provider
"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:urwXl8rPDHA.1748@TK2MSFTNGP11.phx.gbl...physical> Your connection string is not valid. The DBQ= parameter requires aServer.Mappath()> path, eg c:\inetpub\wwwroot\fpdb\myDatabase.mdb YOu can useODBC -> to get this value.
>
> eg:
>
> <%
> strConnect = _
> "Driver={Microsoft Access Driver (*.mdb)};" & _
> "DBQ=" & Server.Mappath("/fpdb/StoresDB.mdb") & ";"
>
> objConn.Open strConnect
> %>
>
> However, it is recommended you use the OLEDB Provider instead:
>
> strConnect = _
> "Provider=Microsoft.Jet.OLEBD.4.0;" & _
> "Data Source=" & Server.Mappath("/fpdb/StoresDB.mdb") & ";"
>
> Cheers
> Ken
>
>
> "Pets2adopt" <pets2adopt@rogers.com> wrote in message
> news:bcKLa.18264$x4o.5529@news04.bloor.is.net.cabl e.rogers.com...
> : Thanks Bob I managed to get past most of my errors but I have one more
> : question for you or for the group.
> : I'm now getting the following error
> :
> :
> : Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> :
> : [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> : registry key 'Temporary (volatile) Jet DSN for process 0x4798 Thread
> 0x4670
> : DBC 0x2397adc Jet'.
> :
> : /storesearch.asp, line 10
> :
> : the new code is listed bellow
> :
> : <%@ Language=VBSCRIPT %>
> : <% Option Explicit %>
> : <%
> : 'create a connection to our database that contains the
> :
> : Dim objConn
> : Set objConn = Server.CreateObject("ADODB.Connection")
> : objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};" &_
> : "DBQ=www.web/fpdb/storesdb.mdb"
> : objConn.Open
> :
> :
> :
> : ' create a recordset object
> : Dim objRS
> : Set objRS = Server.CreateObject("ADODB.Recordset")
> :
> : ' open the recordset
> : objRS.Open "store_info", objConn, , , adCmdTable
> :
> :
> :
> : ' display the results
> : Do While not objRS.EOF
> : response.write "<B>" & objRS("City") & "</b><br>"
> : response.write "<br>" & objRS("Store_Name") & "<BR>"
> :
> :
> :
> : ' move to the next record
> : objRS.MoveNext
> : Loop
> :
> : ' clean up !!
> : objRS.Close
> : set objRS = Nothing
> :
> : objConn.close
> : set objConn = nothing
> :
> : %>
> :
> :
> : Any more help that you provide would be appreciated
> :
> :
> : "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> : news:OzSWSKkPDHA.2036@TK2MSFTNGP10.phx.gbl...
> : > [url]http://www.aspfaq.com/show.asp?id=2109[/url]
> : >
> : > Pets2adopt wrote:
> : > > The error i'm getting is the page will not load. it seams that any
> : > > asp code that i'm dropping onto the server is not loading
> : > >
> : > > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> : > > news:#3#FmsePDHA.1380@TK2MSFTNGP11.phx.gbl...
> : > >> What errors?
> : > >>
> : > >> You should switch to the native Jet OLEDB provider instead ofof> : > >> see [url]www.able-consulting.com/ado_conn.htm[/url] for examples.
> : > >>
> : > >> HTH,
> : > >> Bob Barrows
> : > >>
> : > >> Pets2adopt wrote:
> : > >>> can anyone let me know why the code bellow is creating errors I'm
> : > >>> trying to connect to a access data base then display the results> : > >>> what's in the data base.
> : > >>>
> : > >>> thank you for any help that you can offer
> : > >>>
> : > >>>
> : > >>>
> : > >>> <%@ Language=VBSCRIPT %>
> : > >>> <% Option Explicit %>
> : > >>> <!--#include virtual="/adovbs.inc"-->
> : > >>> <%
> : > >>> 'create a connection to our database that contains the
> : > >>>
> : > >>> Dim objConn
> : > >>> Set objConn = Server.CreateObject("ADODB.Connection")
> : > >>> objConn.ConnectionString="Driver={Microsoft Access Driver
> : > >>> (*.mdb)};" &_ "DBQ=K:\myweb3\fpdb\storesdb.mdb"
> : > >>> objConn.Open
> : > >>>
> : > >>>
> : > >>>
> : > >>> ' create a recordset object
> : > >>> Dim objRS
> : > >>> Set objRS = Server.CreateObject("ADODB.Recordset")
> : > >>>
> : > >>> ' open the recordset
> : > >>> objRS.Open "store_info", objConn, , , adCmdTable
> : > >>>
> : > >>>
> : > >>>
> : > >>> ' display the results
> : > >>> Do While not objRS.EOF
> : > >>> response.write "<B>" & objRS("City") & "</b><br>"
> : > >>> response.write "<br>objRS("Store_Name") & "<BR>"
> : > >>>
> : > >>>
> : > >>>
> : > >>> ' move to the next record
> : > >>> objRS.MoveNext
> : > >>> Loop
> : > >>>
> : > >>> ' clean up !!
> : > >>> objRS.Close
> : > >>> set objRS = Nothing
> : > >>>
> : > >>> objConn.close
> : > >>> set objConn = nothing
> : > >>>
> : > >>> %>
> : >
> : >
> : >
> :
> :
>
>
chippy Guest



Reply With Quote

