Home | Advertising Info5 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Saturday, April 20, 2024  

  Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Database Issues
 PowerASP Code Help Area : Classic ASP - Database Issues
Subject Info: displaying record get by checkbox value A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
query4u
Newbie
Newbie


Joined: May/11/2005
Location: India
Online Status: Offline
Info: 4
Added: 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 info by query4u
 
firas_TheGeek
Newbie
Newbie
Avatar

Joined: May/27/2006
Location: Oman
Online Status: Offline
Info: 28
Added: 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 info by firas_TheGeek Visit firas_TheGeek's Homepage
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area

   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 what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com