29. januar 2001 - 13:53Der er
14 kommentarer og 1 løsning
select distinct colume from database
hey there
have 2 asp pages the first is a form that send that value to the next page However I would like the value to be a distinct colume and not row from the database something like this
strSQL = \"SELECT FROM abc(\" & request(\"alpha\") & \"\') ORDER BY ID ASC ;\"
alpha should be the value of the colume name sent by my form
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
I tried your idea but the page wouldn`t display I dont get any error message I think my loop is incorrect, Im not that advanced in ASP :) as you can see
intPage = Request(\"page\") If isNumeric(intPage) = False Or intPage < 1 Then intPage = 1 End If Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"SELECT FROM abc(\" & request.form(\"alpha\") & \"\') ORDER BY ID ASC ;\" strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"popup.mdb\") rs.Open strSQL, strDSN, 1 If Not (rs.BOF Or rs.EOF) Then rs.PageSize = 5 rs.AbsolutePage = intPage intRecCount = rs.PageSize intPageCount = rs.PageCount
hey there again guys sorry I cant seem to work it out heres 100 points to the first one to work it out as i have looked at it to long and cant make head or tail of it ;(
intPage = Request(\"page\") If isNumeric(intPage) = False Or intPage < 1 Then intPage = 1 End If Set rs = Server.CreateObject(\"ADODB.RecordSet\") sqlstr = \"select \" & Request.Form(\"alpha\") & \" from abc\"
strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"popup.mdb\") rs.Open strSQL, strDSN, 1 If Not (rs.BOF Or rs.EOF) Then rs.PageSize = 5 rs.AbsolutePage = intPage intRecCount = rs.PageSize intPageCount = rs.PageCount
I have done the script just as a normal database connection and changed what you said I am leaving out the \"next\" funchion :( till another time when i know more what i am doing :)
I have know tried but it still will not show anything <html> <body> <%
that works like a dream :) I still cant see want was wrong but now it works so I can go thru it and see for myself
Many thanks :) Guzzie
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.