If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > problem retriving information from database

View Poll Results: Wat can i do to make it work?
I was told that this is a good site. 2 100.00%
could some1 help me pls ! im kinda desperate ;( 0 0%
Multiple Choice Poll. Voters: 2. You may not vote on this poll

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-06, 04:17
joelblack joelblack is offline
Registered User
 
Join Date: Jun 2006
Posts: 1
Thumbs down problem retriving information from database

hey guys, im a newbie in asp. im pretty bad in the part that connects the webpage to the mssql database using asp connection.
ive tried ways after ways to retrive the information from the database and i still cant get it right dont even know if im on the right track. hope u guys can help me out

info in mssql -(table name : cust), (database name : silverstone )
-----------
-------------------------------
custid | custname |
----------------------------- |
A0123 | Joel Dumb dumb |
A0122 | Emous Bim Boe |
-------------------------------

coding
------
<%
Set SysConn = Server.CreateObject("ADODB.Connection")
SysConn.Open "silverstone", "sa", ""
%>
<html>
<body>
<%
CustID = Session(mstrSessionPrefix & "CustDlg-CustUserID"CustID = Request.QueryString("CustID")

' Set sql.
strSQL = "SELECT * "
strSQL = strSQL & "FROM cust "

%>
<tr>
<tr>
<td> Car Registration Number : </td>
<form name="form4" method="post" action="">
<td>
<input name="text_regno" type="text" id="text_regno">
</td>
</form>
</tr>

<tr>
<td> Car Registration Number : </td>
<form name="form4" method="post" action="">
<td>
<input name="text_regno" type="text" id="text_regno">
</td>
</form>
</tr>
</tr>
</body>
</html>

<%
SysConn.Close
set SysConn = nothing
%>



pls help me out. thankx in advance !
Reply With Quote
  #2 (permalink)  
Old 06-28-06, 16:49
csamuels csamuels is offline
Registered User
 
Join Date: Mar 2006
Location: south jersey, usa
Posts: 53
http://www.asp101.com/samples/db_edit.asp

Here's a quick sample that ties together a number of database functions into a simple little script for adding, deleting, and editing data in a database table. It's a pretty simple little script, but it illustrates a number of useful techniques and should help tie all the pieces together into one script.
__________________
"They say Moses split the Red Sea
I split the blunt and rolled the fat one, I'm deadly"
-- Tupac 'Blasphemy'
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On