Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: total moran beginner needs help!!


Message #1 by "pengu" <pero@c...> on Mon, 28 May 2001 16:41:40
Can someone please give me the simplest code to display a field from a 

table, i dont want any loops, how can i show just one field by its id?

something like response.write "fldname(id)"

but what should the beginning of this code look like?



Thanks alot!!
Message #2 by <yoshiesworld@y...> on Mon, 28 May 2001 23:52:55 -0700
Hope this helps out...



Dim RS

Set RS = server.createobject("adodb.recordset")

RS.open "Select fldName from tblName where fldID = id;", "dsn=Database

Name"



Response.write RS("fldName")



You may run into a problem if you don't create a DSN through ODBC.... 



Regards,

Joshua







-----Original Message-----

From: pengu [mailto:pero@c...] 

Sent: Monday, May 28, 2001 4:42 PM

To: ASP Databases

Subject: [asp_databases] total moran beginner needs help!!





Can someone please give me the simplest code to display a field from a 

table, i dont want any loops, how can i show just one field by its id?

something like response.write "fldname(id)" but what should the

beginning of this code look like?



Thanks alot!!

Message #3 by "Daniel O'Dorisio" <dodorisio@h...> on Tue, 29 May 2001 09:33:10 -0400
use an oledb connstring.. it is quicker



it should look something like:

Provider=SQLOLEDB;Password=pass;User ID=DOdorisio;Initial

Catalog=Hausers;Data Source=server1.odorisio.local;

for sql server



or

Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\inetpub\data\db.mdb;User

ID=user;Password=pass;

for ms access



daniel



Daniel O'Dorisio

dodorisio@h...

xxx-xxx-xxxx





-----Original Message-----

From: Joshua [mailto:yoshiesworld@y...]

Sent: Tuesday, May 29, 2001 2:53 AM

To: ASP Databases

Subject: [asp_databases] RE: total moran beginner needs help!!





Hope this helps out...



Dim RS

Set RS = server.createobject("adodb.recordset")

RS.open "Select fldName from tblName where fldID = id;", "dsn=Database

Name"



Response.write RS("fldName")



You may run into a problem if you don't create a DSN through ODBC....



Regards,

Joshua







-----Original Message-----

From: pengu [mailto:pero@c...]

Sent: Monday, May 28, 2001 4:42 PM

To: ASP Databases

Subject: [asp_databases] total moran beginner needs help!!





Can someone please give me the simplest code to display a field from a

table, i dont want any loops, how can i show just one field by its id?

something like response.write "fldname(id)" but what should the

beginning of this code look like?



Thanks alot!!


  Return to Index