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

Data access problem

Status
Not open for further replies.

mgid

Programmer
Oct 2, 2000
87
US
I'm fairly new to web development and all I'm trying to do is get some data on the page and despite the fact that everything seems fine and right, I'm having problems getting data to show up. Basically, I set up multiple connection for testing, then added a recordset object, then added some textboxs and a grid, through which no data shows up, despite having bound them to the recordset, which is, in turn, bound to the Data Environment. No doubt, it's something small. I'm working with InterDev 6, Win 2000, IIS 5.0. Thanks in advance.
 
Okay, I always tell people to ditch the Visual Interdev DTCs and just use ADO. Here is a simple step by step:

<%

'/******************************'******some page .asp************
'\*************d4v1d5e**********/

set conn = Server.createObject(&quot;ADODB.Connection&quot;)
strConnect = &quot;MY connection string&quot;
'check out for the
'connection string to your database, just edit the path
'i'd suggest using access for starters

conn.open strConnect

strSQL = &quot;Select * from mytable&quot;
'pretend this table has fields for firstname, lastname

set r = conn.execute(strSQL)

Response.write &quot;<input value=&quot; & r.fields(0) & &quot;><br>&quot;
Response.write &quot;<input value=&quot; & r.fields(1) & &quot;>&quot;

%>

Hope this helps,

d4v1d5e
 
I ditched the InterDev dtc's after a day of messing around with them.

Just a general question:
Do people who use asp use them or generally script everything? That is, are they there so people can build applications without writing code, or are they a valid way of speeding up development?

thanks
 

Hi,
I use recordset DTC's all the time and have no problems with them.
I use ADO and script when I'm inserting or updating tables and DTC's when displaying values, because it saves me a lot of time.
DTC's are usually a faster way to do things, but it depends what you want. Some things in DTC's don't work properly and it takes a lot of time and effort to figure it out.
Most of my friends just use ADO. &quot;Defeat is not the worst of failures. Not to have tried is the true failure.&quot;
-George E. Woodberry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top