Jump to content

Jerome

Members
  • Posts

    94
  • Joined

  • Last visited

Posts posted by Jerome

  1. You have to change the type of cursor you are using while running trought your recordset... What does this mean? :) There are diferent ways to navigate throught a recordset. The default property is adOpenForwardOnly and it does'nt allow you use the RecordCount property. So, when openning your recordset, try using this :

    Recordset.Open sql, con, adOpenStatic

    and visit the page : http://www.w3schools.com/ado/met_rs_open.asp

  2. dataSQL is a variable that only contains your query string. You use it to create your recordset (that contains the data you want to display). Now if you want to display a particular field of your recordset you call it like this :

    Response.Write(rs("news_content"))

    Here is your code :

    <% Dim ID, conn, rs, dataSQLID = Request.QueryString ("ID")Set conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("news-database.mdb"))Set rs = Server.CreateObject("ADODB.recordset")dataSQL = " SELECT news_content FROM news_tbl WHERE ID = '" & ID & "' "rs.Open dataSQL, conn'here you just use a loop that runs trought your recordset, it stops when it reach the end of the recordset (End Of File) Do While Not rs.EOFResponse.Write(rs("news_content")) rs.MoveNextLooprs.closeset rs = nothingconn.closeset conn = Nothing%>

    Happy programming :)

  3. I was curious to know what <isindex> was, here is the answer :

    <ISINDEX ...> is the old way to make an online form. The purpose of <ISINDEX ...> has been entirely fulfilled and greatly expanded by regular forms...
    You can find more here, but you should better use the form tag rather than the isIndex...Why don't you try to put the second tag your are asking for into an html document just to see the result?anchor.html
    <html><head><title>Anchor</title></head><body><a href="http://w3schools.invisionzone.com">w3schools</a></body></html>

  4. :) First of all you should control the input in your database... if an account already exists then you should update it and not insert a new data... Now if you want to clean your database, try some count(distinct) queries to catch the duplicates...
  5. Could you paste your code pls? The part where you are trying to delete some elements of your array... I suppose you should redimensionate your array...

  6. I don't think you can't prevent that...I have just been trying your combo box : - If you type one letter after the other ('p' then 'a' then 'r' then 't'...) then you are linked to the letter 'p', then 'a', then 'r',...- Now if you write quickly 'partridge' it will link you to the word 'partridge'So just write it quickly :)

  7. Ok, try to use an absolut path like this and tell me if its works :

    Set rs = fs.GetFile("c:\Inetpub\wwwroot\app1.asp")

    If you get any error message, pls paste it here.Good luck :)

  8. Ok, so fisrt you need to recuparate the id value from your url string like this :

    Dim idid = Request.QueryString("id")

    Then you just insert this value into your query like this :

    <%'here you open the connectionSet rs = Server.CreateObject("ADODB.recordset")sql = " SELECT * FROM newst_tlb WHERE ID = '" & id & "' "rs.Open sql, con'here you display the fields and close connection and recordset%>

    Last thing, instead of using a SELECT *, you should better specify wich fields your looking for : SELECT news_header, news_content for example. That is a good way to gain some loading time.

  9. Arianna,How do you make the link to the URL? You should be passing the login and the password as arguments, no? Could you paste your code and/or the (problematic) URL?

  10. Bear,No, (Flag & 4) is a way of saying (Flag AND 4) but at a bit level. Here is an example inspired from this URL : http://en.wikipedia.org/wiki/Bitwise_operation.Imagine that the value that represent "Flag" is equal to the number 2, in binary, you write it like this : 010. The number 4 from your query is written like this : 100. Now you make your logical AND operation :010100 AND----000If the two bytes are equal to 1 then the result is 1, else it is 0. Once you have your result (000), you translate it to his decimal representation, in our case it's the number 0.Another example with Flag = 4100100 AND----100The result is 100 --> the number 4.Hope this help.

×
×
  • Create New...