Jump to content

Matar

Members
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Matar

  1. hi im trying to connect an access database with asp.net there are no error but win i run the page i see a blank page , this is the script <%@ Import Namespace="System.Data.OleDb" %><script runat="server">sub Page_Loaddim dbconn,sql,dbcomm,dbread dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source = " & "C:\Inetpub\wwwroot\webdata\log.mdb")dbconn.Open() sql = "SELECT * FROM stu"dbcomm=New OleDbCommand(sql,dbconn)dbread=dbcomm.ExecuteReader()end sub</script><html><body><form id="Form1" runat="server"><asp:Repeater id="customers" runat="server"><HeaderTemplate><table border="1" width="100%"><tr><th>user</th><th>pass</th></tr></HeaderTemplate><ItemTemplate><tr><td><%#Container.DataItem("user")%></td><td><%#Container.DataItem("pass")%></td></tr></ItemTemplate><FooterTemplate></table></FooterTemplate></asp:Repeater></form></body></html>why ??
  2. hi thank u so i must download SQL Server Management Studio Express ohhhhhhhhmy problem is i dont downlaod SQL Server Management Studio Express i good in sql language but i dont use sql server engin never befor
  3. hi when u connect asp with db u will use ADO Interface so this scripts connect asp with access db set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("/mydb/users.mdb")) set rs = Server.CreateObject("ADODB.recordset")rs.Open "Select * FROM matar", conndo until rs.EOF for each x in rs.Fields Response.Write(x.value ) Response.Write(x.name & "<br />") next rs.MoveNextlooprs.closeconn.closethe first line 2 create a connection var called conn the second line 2 tell asp that the db is access db the third line to establish the connection with the db .. the mydb folder must be locate in the www folder inside the inetpub .. user.mdb the name of the db . the forth line is to create a recordset (DATA READER) form the db ,, rs is a var the fifth line to open the rs connection and get all data from matar table then we make a for loop to get the data form all record the last 2 lines to close the connection with db .GooD Luckmatar
  4. hii download the sql server 2005 express edtion but i dono how i can create a database !!can i create a database by sql server 2005 express edtion ??who know how please post me the way ?
  5. Matar

    i have a problem

    hi how i can retreve a data form two related tables ?i have 2 tables 1 - users table : this table contains the username and password for the users 2 - data table : this table conatins an addtional data about the user .so how i can make a connection to the user table after that the script dedected the data from the data table ???
  6. hi no nothing there like you say there are just all the pages thats stroed in wwwroot and the asp.net pages show with the .aspx extwhat is that ?i setup some options and when i run the pages i see this Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
  7. ya when i try a simple html page its work and classic asp pages its works ...i installed the IIS before The .netframework !!thank you
  8. i have a xp windows sp2 this is the code <script runat="server">Sub Page_Load lbl1.Text="The date and time is " & now()End Sub</script><html><body><form runat="server"><h3><asp:label id="lbl1" runat="server" /></h3></form></body></html>thanks
  9. hi i have an error when i running the asp.net pageswhen i wrote localhost/index.aspxi see a blank page why ?i install the .netframework and the IIS what else is needed to run asp.net pages ?regards
  10. hi allcould i ask if any one here have a link for .net free books with regards
  11. Matar

    pattern in asp

    Thanks all ,its realy useful regards
  12. Matar

    pattern in asp

    hi i need a code to check if the text box value just letters ,so the user should be enter letters , icheck it for number value and null value but i can't prevent it from acespting the (!@#$%^&*()_=+*") how ??
  13. hi i try this code <%Dim Regex, BunnySet Regex = New RegexpRegex.Global = TrueRegex.Multiline = TrueRegex.IgnoreCase = TrueRegex.Pattern = "^\d+$" Bunny = "matar^"if(bunny) thenResponse.write ("true")elseresponse.write("error")end if%>and i see this errorError Type:Microsoft VBScript runtime (0x800A000D)Type mismatch: '[string: "samer^"]'/test.asp, line 9
  14. Matar

    chk if founded in db

    hi i resolve it i but if rs.eof before the rs.addnewand i but the 2 end if at last i do like Yehwha
  15. hi cst for what we use ??and are there a function check if the data just string thats mean the data sholudn't be like * / &^%$ ..etc ??
  16. Matar

    chk if founded in db

    hi allthis is a code to serach if this item in my db ,, if exsist this is error ,elseadd it to my db but it doesn't work and i see this errorError Type:ADODB.Recordset (0x800A0BB9)Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another./add.asp, line 11what i should do ?
  17. hi thx Yahweh for your replay the data field type is yes / No
  18. hi i write this code form drop down list this code prevent the user from selecting the same value on 2 list so there are 2 list and there option the same both have 4values red,green,blue,yellowwhen the user choose red from the first list in the second list the red value will hide i need to modfiy this code to work with 4 list this the code how can do it ??
  19. hi i am trying to get the checkbox value to my db but its does'work how can give me a simple code ??
  20. Matar

    help me

    hi i write a code thats check if the dropdown menu valuse yes or no if no then no problem if the next field is empty if yes then the next field value must be not empty and the code i wrote doest't work this is my code what should the code will be ???????
  21. Matar

    ASP

    hi all microsoft products have a spiceal effict ,, but i think asp not a standalone langauge like php , when u work in asp u must use an other microsoft product and when u use asp 100% u must use vbscript ,, then thats depands on the other application u will use it in ut project . for example if use a sql server as a database its more compateble with asp , cause the same company create it , see the major of php sites use the MySql as a database . so all microsoft products easy to learning and more popular .i think this issues enough to use asp .
  22. hi try this code and it get all recored this is the result samerenamesamerenamemohdnamemohdnamei have just 2 field and it is get the both field
  23. Matar

    is this true ?

    hi thnak u its useful linkbut i have problem with this case "agv" If trim(Len(sFieldValue)) = 0 And Not IsNumeric(sFieldValue)Then bFieldIsOkay = Falsethis code doesn't work when the user enter a string its acsept this value its work just when the user let it empty
×
×
  • Create New...