| | |
Very new to ASP
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2004
Posts: 3
Reputation:
Solved Threads: 0
Hi,
I am very very new to ASP. So far i have been able to connect to the SQL database using dreamweaver mx 2004 but im not sure where to go from here.
I have a support databse that i have setup with a few records.
The table structure looks something like this
Client
-ClientID
-Client
-Address
-PhoneNumber
How do i go about showing the list of clients on the ASP page?
Any help or links would be GREAT :c) im stuck and i cant seem to find anything at all!!!
cheers,
Orion
I am very very new to ASP. So far i have been able to connect to the SQL database using dreamweaver mx 2004 but im not sure where to go from here.
I have a support databse that i have setup with a few records.
The table structure looks something like this
Client
-ClientID
-Client
-Address
-PhoneNumber
How do i go about showing the list of clients on the ASP page?
Any help or links would be GREAT :c) im stuck and i cant seem to find anything at all!!!
cheers,
Orion
A couple of really good places to start are www.w3schools.com, www.4guysfromrolla.com, www.asp101.com
There are heaps of tutorials and sample scripts out there. Have a search around, try some out and if you get stuck hit the forums and ask away.:cheesy:
Good luck
There are heaps of tutorials and sample scripts out there. Have a search around, try some out and if you get stuck hit the forums and ask away.:cheesy:
Good luck
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
Join Date: Sep 2004
Posts: 3
Reputation:
Solved Threads: 0
ok - well i have now spent a day on this, no luck. I have been to all those sites as well and i just cant get it 
Basically i want to pull basic info from my SQL DB and display it on the ASP page. I have tried so many things but all i get is errors. Lately i have actually resolved the errors but nothing is written to the screen!!
Arghh this is driving me nuts.
Can anyone tell me how to write up the results from a SQL BD to a plain ASP file?
I have the DB connection done and its working.
Cheers,
Orion

Basically i want to pull basic info from my SQL DB and display it on the ASP page. I have tried so many things but all i get is errors. Lately i have actually resolved the errors but nothing is written to the screen!!
Arghh this is driving me nuts.
Can anyone tell me how to write up the results from a SQL BD to a plain ASP file?
I have the DB connection done and its working.
Cheers,
Orion
It's going to be easier to help you if you can post the code you are trying and we can work through that and fix whatever problems there may be.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
Join Date: Sep 2004
Posts: 10
Reputation:
Solved Threads: 0
orionm>
There are tones of tutorials on google about stuff like this. For now here is the answer you were looking for.
There are tones of tutorials on google about stuff like this. For now here is the answer you were looking for.
ASP Syntax (Toggle Plain Text)
'After you open your connection SQL = "SELECT * FROM Client" Set rsMaster = objConnection.Execute(SQL) If rsMaster.EOF = False Then Do Until rsMaster.EOF 'To make it easier on your self you should make your primary key ID instead of ClientID Response.Write("Client ID: " & rsMaster("ClientID") & "<br>") Response.Write("Client: " & rsMaster("Client") & "<br>") Response.Write("Address: " & rsMaster("Address") & "<br>") Response.Write("Phone Number: " & rsMaster("PhoneNumber") & "<br>") Response.Write("<hr>") rsMaster.MoveNext Else Response.Write("No records in table") End If
•
•
Join Date: Sep 2004
Posts: 3
Reputation:
Solved Threads: 0
Hahaha *crazy laugh* - ok ive tired that code and no luck.
I must be doing something wrong.
The error reads
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/newcall.asp, line 111
Line 111 being "Set rsMaster = objConnection.Execute(SQL)"
Does this mean i have not set my connection properly?
for the connection i have the collowing code
I must be doing something wrong.
The error reads
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/newcall.asp, line 111
Line 111 being "Set rsMaster = objConnection.Execute(SQL)"
Does this mean i have not set my connection properly?
for the connection i have the collowing code
ASP Syntax (Toggle Plain Text)
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="Connections/support.asp" --> <% Dim Client Dim Client_numRows Set Client = Server.CreateObject("ADODB.Recordset") Client.ActiveConnection = MM_Support_STRING Client.Source = "SELECT * FROM dbo.Client" Client.CursorType = 0 Client.CursorLocation = 2 Client.LockType = 1 Client.Open() Client_numRows = 0 %>
•
•
Join Date: Sep 2004
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by orionm
Hi,
I am very very new to ASP. So far i have been able to connect to the SQL database using dreamweaver mx 2004 but im not sure where to go from here.
I have a support databse that i have setup with a few records.
The table structure looks something like this
Client
-ClientID
-Client
-Address
-PhoneNumber
How do i go about showing the list of clients on the ASP page?
Any help or links would be GREAT :c) im stuck and i cant seem to find anything at all!!!![]()
cheers,
Orion
oConn.Open "Driver={SQL Server};" & _
"Server=MyServerName;" & _
"Database=myDatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
then you will need your SELECT statement:
SELECT ClientID,Client, Address, City FROM Clients
*Check out this tutorial
http://www.w3schools.com/ado/default.asp
then use <%Response.write("Client")%>
this is a very incomplete simple example. I am new too. Hope it helps
There are great ASP Tutorials at Web Wiz Guide which can always be of help also.
Web Wiz Guide : http://www.webwizguide.info/asp/tutorials/default.asp
Web Wiz Guide : http://www.webwizguide.info/asp/tutorials/default.asp
•
•
Join Date: Feb 2005
Posts: 86
Reputation:
Solved Threads: 3
I know this connection is generated from Dreamweaver UltraDev or MX.
Do you know how to use the repeat region in UltraDev or MX? It's fairly easy.
Here is my sample, no response.write use to confuse non programmers.
<%
Dim Client
Dim Client_numRows
Set Client = Server.CreateObject("ADODB.Recordset")
Client.ActiveConnection = MM_Support_STRING
Client.Source = "SELECT * FROM Client" ' assume your table name is Client
Client.CursorType = 0
Client.CursorLocation = 2
Client.LockType = 1
Client.Open()
Client_numRows = 0
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = 10 ' Display how many records. In this sample we set 10 records
Dim Repeat2__index
Repeat2__index = 0
Client_numRows = Client_numRows + Repeat2__numRows
%>
<html>
<head>
<title>Test</title>
<body>
<table>
<tr>
<td>
' All records are display inside one table. If you want alternate color for each cell, you need to create another table and put the "While ((Repeat2__numRows <> 0) AND (NOT Client.EOF)) " outside the table.
<%
While ((Repeat2__numRows <> 0) AND (NOT Client.EOF))
%>
Client ID: <%=Client("ClientID")%><br>
Client: <%=Client("Client")%<br>
Address: <%=Client("Address")%><br>
Phone Number: <%=Client("PhoneNumber")%><br>
<hr>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
Client.MoveNext()
Wend
%>
</td>
</tr>
</table>
<%If Client.EOF Then%>
No records in table
<%
End If
%>
<%
Client.Close ' Close connection
Set Client = Nothing ' Kill and free up memory
%>
</body>
</html>
www.ex-designz.net
Dexter
Do you know how to use the repeat region in UltraDev or MX? It's fairly easy.
Here is my sample, no response.write use to confuse non programmers.
<%
Dim Client
Dim Client_numRows
Set Client = Server.CreateObject("ADODB.Recordset")
Client.ActiveConnection = MM_Support_STRING
Client.Source = "SELECT * FROM Client" ' assume your table name is Client
Client.CursorType = 0
Client.CursorLocation = 2
Client.LockType = 1
Client.Open()
Client_numRows = 0
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = 10 ' Display how many records. In this sample we set 10 records
Dim Repeat2__index
Repeat2__index = 0
Client_numRows = Client_numRows + Repeat2__numRows
%>
<html>
<head>
<title>Test</title>
<body>
<table>
<tr>
<td>
' All records are display inside one table. If you want alternate color for each cell, you need to create another table and put the "While ((Repeat2__numRows <> 0) AND (NOT Client.EOF)) " outside the table.
<%
While ((Repeat2__numRows <> 0) AND (NOT Client.EOF))
%>
Client ID: <%=Client("ClientID")%><br>
Client: <%=Client("Client")%<br>
Address: <%=Client("Address")%><br>
Phone Number: <%=Client("PhoneNumber")%><br>
<hr>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
Client.MoveNext()
Wend
%>
</td>
</tr>
</table>
<%If Client.EOF Then%>
No records in table
<%
End If
%>
<%
Client.Close ' Close connection
Set Client = Nothing ' Kill and free up memory
%>
</body>
</html>
www.ex-designz.net
Dexter
Dexter Zaf
Ex-designz.net
Ex-designz.net
![]() |
Similar Threads
- Looking for Sr. ASP .NET Developers (Software Development Job Offers)
- ASP.NET/SQL Developer/Programmer (Web Development Job Offers)
- ASP.Net perm full time programmer wanted (Web Development Job Offers)
- Front-End Developer with ASP.net needed!!! (Web Development Job Offers)
- Experience ASP.net with C# developer needed!! (Web Development Job Offers)
- ASP.Net / C# Web Developer (Web Development Job Offers)
Other Threads in the ASP Forum
- Previous Thread: Run ASP scripts on Win XP Home
- Next Thread: Windows 2000 server not allowing ASP access.
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





