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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem getting the full record from Database

Status
Not open for further replies.

DanSc0tt

MIS
Sep 17, 2001
30
0
0
DE
Hi,

Apologies if this is a simple one!

I am using VB in asp to pull records from an Access database. Opening a recordset and then pulling them into an ASP.

My problem is that the page is only showing the record up to where the first space is and then truncating it. I think it might be something pretty obvious??

Any ideas?

Thanks

Dan
 
post your code - in particular the bit that pulls the info from the DB and displays it on screen.

At a guess I'd say you need to surround the text with quotes - maybe you're trying to populate a textbox?

Tony
_______________________________________________________________
 
Code below......help appreciated!! Thanks Dan



<%

sql = "SELECT mtgLine FROM tblmeetings WHERE mtgDate=#" & vAGD & "#"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
%>
<form method=post action="agenda2.asp?AGD=<%response.write vAGD%>">
<table>
<tr><td><b><u>Agenda</u></b></td></tr>
<%
if rs.RecordCount = 0 then
For y = 1 to 10
%>
<tr><td>Line <% response.write y %> <input type="text" name="mtgLine<%=y%>" value="[Enter Line]" size=50></td></tr>
<%next
else
rs.MoveFirst
For x = 1 to 10
if rs.eof = true then
%>
<tr><td>Line <% response.write x %> <input type="text" name="mtgLine<%=x%>"[Enter Line]" size=50></td></tr>
<%else
%>
<tr><td>Line <% response.write x %> <input type="text" name="mtgLine<%=x%>" value=<%=rs("mtgLine")%> size=50></td></tr>
<%
rs.MoveNext
end if
next
end if
%>
 
I should do this for a living :)

You have some [red]quotes[/red] missing in your textbox:
Code:
<tr><td>Line <% response.write x %> <input type="text" name="mtgLine<%=x%>" value=[red]"[/red]<%=rs("mtgLine")%>[red]"[/red] size=[red]"[/red]50[red]"[/red]></td></tr>

Tony
_______________________________________________________________
 
Genius - told you it would be simple ;)

Thanks very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top