Home | Advertising Info3 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Sunday, May 12, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Database Issues
 PowerASP Code Help Area : Classic ASP - Database Issues
Subject Topic: displaying record get by checkbox value Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
query4u
Newbie
Newbie


Joined: May/11/2005
Location: India
Online Status: Offline
Posts: 4
Posted: May/27/2005 at 6:43am | IP Logged Quote query4u

Hello,

I want show records in .asp page. in page i collecting checkbox values which are submited to this .asp page. i am storing that values in one variable & passing that to query. but i am getting an error can anybody tell me how to do it. i have written following code.

dim strIDS

strIDs = Replace(Request.Form, "&chk1=", ",")
strIDs = Replace(strIDs, "chk1=", "")

set con = Server.CreateObject("ADODB.Connection")
mydb = Server.MapPath("db/trycera.mdb")
con.mode=adModeReadWrite
con.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
set rs=con.execute("select * FROM ulogin WHERE username IN (" & strIDs & ")") 

chk1 is name of checkbox values i am taking checkbox values from another page.

there problem in query only,how to write please tell me.

Back to Top View query4u's Profile Search for other posts by query4u
 
firas_TheGeek
Newbie
Newbie
Avatar

Joined: May/27/2006
Location: Oman
Online Status: Offline
Posts: 28
Posted: May/27/2006 at 9:47am | IP Logged Quote firas_TheGeek

first lets see what is written in the query

put this code

dim strIDS

strIDs = Replace(Request.Form, "&chk1=", ",")
strIDs = Replace(strIDs, "chk1=", "")

response.write strIDs

response.end

set con = Server.CreateObject("ADODB.Connection")
mydb = Server.MapPath("db/trycera.mdb")
con.mode=adModeReadWrite
con.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& mydb &";Persist Security Info=False"
set rs=con.execute("select * FROM ulogin WHERE username IN (" & strIDs & ")") 

 

 

tell me what shows on the page to tell u the solution

 

Regards



__________________
Firas S Assaad (TheGeek)
firas489@gmail.com
0096892166434
http://firas-thegeek.blogspot.com
Back to Top View firas_TheGeek's Profile Search for other posts by firas_TheGeek Visit firas_TheGeek's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com