Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Access from ASP 1

Status
Not open for further replies.

AgentM

MIS
Jun 6, 2001
387
US
Can I call Access from ASP?. Does anybody have any info.

Thank you
 
here is an example I just pulled from VB6 Database Programming from Wrox:

<%

dim myconnection
dim rsTitleList

set myconnection = server.createobject(&quot;ADODB.connection&quot;)

myconnection.open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\BegDB\Biblio.mdb&quot;

SQLQUERY = &quot;SELECT title from titles&quot;

set rsTitleList = myConnection.execute(SQLQuery)

do until rsTitleList.eof
response.write rsTitleList(&quot;Title&quot;)
%>
<br>
<%
rsTitleList.movenext

LOOP

rsTitleList.close
set rsTitleList = nothing

%>

<br>

<!end server side script>
<hr>

</center>
</body>
</html>

Hope this helps
 
<HTML>
<HEAD>
<TITLE>GET DATA FROM ACCESS USING ASP</TITLE>
</HEAD>
<BODY>
<%
Dim MyConnection
Dim MyRecordset
Set MyConnection =Server.CreateObject(&quot;Adodb.Connection&quot;)
With MyConnection
.open &quot;Provider=microsoft.jet.oledb.4.0&quot; & _
&quot;datasource =c:\MyDatabase.mdb&quot;
End With
MyRecordset.open &quot;table_name&quot;,MyConnection,3,3
MyRecordset.movefirst


Response.Write &quot;<table><tr><td>Name</td></RollNo</td></tr>&quot;
While not MyRecordset.eof
Response.Write &quot;<tr><td>&quot;
Response.Write Myrecordset!name & &quot;</td>&quot;
Response.Write &quot;<td>&quot; & Myrecordset!rollno & &quot;</td>&quot;
Response.Write &quot;</tr>&quot;
Myrecordset.movenext
Wend
%>
</table>
</body>
</html>



 
I am guessing that you are typing with your forehead WELCOMESAQI, much like my first post :p
 
Thank you'll people.
But what I meant was calling the Access Application.
Using GetObject or CreateObject.

Any clues on that. Thanks for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top