hi frainds i try to catch ip_address and hostname of pc that is connected in lan with router or switch. i dont know how to catch hostname of pc and mac_address. i am using code for ip address
Request.ServerVariables("REMOTE_ADDR")
:doh:
sanjeev
hi frainds i try to catch ip_address and hostname of pc that is connected in lan with router or switch. i dont know how to catch hostname of pc and mac_address. i am using code for ip address
Request.ServerVariables("REMOTE_ADDR")
:doh:
sanjeev
i am getting ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression. ya i have to use ? symbol for parameter in odbce but why @ is used in sql or msaccess thanks
sanjeev
Thanks for your reply Please see my last post where i already changed some code problems in commented code is not worked but other code thats is not commented is inserted data successfully. so i wants to know whats is the mistakes in my commented code thanks
sanjeev
sorry for posting second question on same topic becouse second is for display data is posted by mistake and try to modify in edit mode thats is not shown ,
'this code is worked
isql="Insert Into students(id, first_name, last_name, major,current_credits) values (?, ?, ?, ?, ?)"
idbcomm=new odbccommand(isql,dbconn)
idbcomm.Parameters.Add("id", id.Text)
idbcomm.Parameters.Add("fname", fname.text)
idbcomm.Parameters.Add("lname", lname.Text)
idbcomm.Parameters.Add("major", major.Text)
idbcomm.Parameters.Add("credits", credits.Text)
idbcomm.ExecuteNonQuery()
'This code is not working reports error
'lsSQL ="Insert Into stud(id,firstname,lastname,major) values (@id,@fname,@lname,@major)"
'idbcomm=new odbccommand(isql,dbconn)
'idbcomm.Parameters.Add( "@id",id.Text)
'idbcomm.Parameters.Add( "@fname",fname.text)
'idbcomm.Parameters.Add( "@lname",lname.Text)
'idbcomm.Parameters.Add( "@major",major.Text)
idbcomm.ExecuteNonQuery()
sanjeev
Code for data insertion is not work reported error
<script runat="server">
Sub submit(sender As Object, e As EventArgs)
dim dbconn,sql,dbcomm,dbread
dbconn=New ODbcConnection("dsn=oracle;uid=starter;pwd=starter;")
dbconn.Open()
sql="SELECT \* FROM students"
dbcomm=New ODbcCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
customers.DataSource=dbread
customers.DataBind()
dbread.Close()
dim isql,idbread,idbcomm
isql="Insert Into students(id,first\_name,last\_name,major) values (@fname,@id,@lname,@major)"
idbcomm=new odbccommand(isql,dbconn)
idbcomm.Parameters.Add( "@fname",fname.text)
idbcomm.Parameters.Add( "@id",id.Text)
idbcomm.Parameters.Add( "@lname",lname.Text)
idbcomm.Parameters.Add( "@major",major.Text)
idbcomm.ExecuteNonQuery()
dbconn.Close()
End Sub
</script>
but this code is excuted success fully
<script runat="server">
Sub submit(sender As Object, e As EventArgs)
Dim strConnectionString As String
strConnectionString = "Dsn=oracle;uid=gatepass;pwd=gp"
Dim pConn As New OdbcConnection(strConnectionString)
'Dim pSELECTQUERY As String = "SELECT *from students"
Dim pSELECTQUERY As String = "SELECT distinct PassMaster.*,passarea_dtls.passarea,empmaster.empname,visitormaster.visitorname FROM PassMaster, VisitorMaster,passarea_dtls,empmaster where passmaster.authorisationby=empmaster.empno and passmaster.passareacode=passarea_dtls.passareacode and PassMaster.PassIssueDt + PassMaster.validity -1 >= trunc(sysdate) and PassMaster.PassID = VisitorMaster.PassID and PassMaster.AuthorisationStatus = 'YES' and passmaster.PASSISSUESTATUS not like 'YES' order by PassMaster.PassID"
Dim adapter As New OdbcDataAdapter(pSELECTQUERY, pConn)
Dim DS As DataSet = New DataSet()
adapter.Fill(DS)
Repeater1.DataSource = ds
pConn.Close()
adapter.Dispose()
Repeater1.DataBind()
End Sub
</script>
i don't know whats is the reason any help ?
sanjeev
problems from this part of code
isql="Insert Into students(id,first_name,last_name,major) values (@fname,@id,@lname,@major)"
idbcomm=new odbccommand(isql,dbconn)
idbcomm.Parameters.Add( "@fname",fname.text)
idbcomm.Parameters.Add( "@id",id.Text)
idbcomm.Parameters.Add( "@lname",lname.Text)
idbcomm.Parameters.Add( "@major",major.Text)
idbcomm.ExecuteNonQuery()
sanjeev
EXACTLY I HAVE NOT A LINE NUMBER BUT ERROR IN THIS PART
isql="Insert Into students(id,first_name,last_name,major) values (@fname,@id,@lname,@major)" idbcomm=new odbccommand(isql,dbconn) idbcomm.Parameters.Add( "@fname",fname.text) idbcomm.Parameters.Add( "@id",id.Text) idbcomm.Parameters.Add( "@lname",lname.Text) idbcomm.Parameters.Add( "@major",major.Text) idbcomm.ExecuteNonQuery()
sanjeev
i have modified my code with only insertion parts
sanjeev
line no not given
sanjeev
using vb my problems in insertion ERROR [42000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-00936: missing expression my code is
<%@ import Namespace="System.Data.ODbc" %>
<%@ Import Namespace=" System.Data"%>
<script runat="server">
Sub submit(sender As Object, e As EventArgs)
dim dbconn
dbconn=New ODbcConnection("dsn=oracle;uid=starter;pwd=starter;")
dbconn.Open()
dim isql,idbread,idbcomm
isql="Insert Into students(id,first\_name,last\_name,major) values (@fname,@id,@lname,@major)"
idbcomm=new odbccommand(isql,dbconn)
idbcomm.Parameters.Add( "@fname",fname.text)
idbcomm.Parameters.Add( "@id",id.Text)
idbcomm.Parameters.Add( "@lname",lname.Text)
idbcomm.Parameters.Add( "@major",major.Text)
idbcomm.ExecuteNonQuery()
dbconn.Close()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<th>
Id Number:</th>
<asp:TextBox id="id" runat="server"></asp:TextBox>
<br />
<br />
<th>MaJor:</th>
<asp:TextBox id="major" runat="server"></asp:TextBox>
<br />
<br />
<th>First Name:</th>
<asp:TextBox id="fname" runat="server"></asp:TextBox>
<br />
<br />
<th>Last Name:</th>
<asp:TextBox id="lname" runat="server"></asp:TextBox>
<br />
<br />
<hr />
<asp:Button id="Button1" onclick="submit" runat="server" Text="Submit"></asp:Button>
</form>
</body>
</html>
sanjeev
modified on Saturday, June 28, 2008 2:04 AM
thanks for i got it working by this code
<%For dt = DateAdd("m",-1,Date())To Date()
Response.Write dt & "<br/>" & vbNewLine
Next %>
regards jha
sanjeev
My need to display all dates of 1 or 2 months previous from current dates means if current date is 01-06-2008 then all date between 01-05-2008 to 01-06-2008. How can i do it.
sanjeev
Hi I wants use open image in new winow mouseover on which but can't success [CODE]<scripts laguage="javascrpts"> function new_window(ImageURL) { my_window = window.open(ImageURL, 'new', 'width=500,height=450,left=10,top=10'); } function close_window() { my_window.close(); } </script> <div id="new" style="position:absolute; top:0; left:0 "> <img src="images/1.jpg" onMouseOver="new_window('images1/1.jpg')" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image"> </div>[/CODE] it open only one image images/1.jpg but my needs to open thats image mouse overon which from slide thanks
sanjeev
my proplems due to frame i am using some frame at top,left ceter and right in right frame image disply in fadein so when the mouseover on image, image is expanded in thats frame but not more space to display it in that frame so my need is open a new winodw i try to these two code
<script language="javascript">
//Function to open PopupWindow and Close PopupWindow
function new_window(){
new_window = open('fader.asp','new','width=500,height=450,left= 10,top=10');
}
function close_window()
{
new_window.close();
}
</script>
<div style="position:absolute; top:0; left:0 ">
<!--
Link for opne popup wondow
<a onmouseover="window.open('fader.asp','Popup_Window','toolbar=no ,location=no,directories=no,status=no,menubar=no,s crollbars=no,resizable=no,copyhistory=no,width=475 px,height=420px,top=30,left=20')" >
-->
<img src="images/1.jpg" id="new" onMouseOver="new_window()" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Click to Magnifying Image">
<!--</a>-->
</div>
But when first time mouse over on image popup window is opend and onmouseout closed but not more without page refresh means it works only one time when mouse over on image after first time error is at line 21 where <img src.............> line:-21 char:-1 error:-the callee[server[not server application]]is not available and disappeared; all connection are invalid. the call did not execute. I am creating link onmouseover image window is open but it not close on mouseout I try with these two to open new window onmouseover and close on mouseout thanks
sanjeev
hi but option selected after submition option is forget i wants to after reaload page the selected value is display in option box
sanjeev
i am using asp not .net
sanjeev
i can't understand
sanjeev
Hello I have a page thats display reports my requirements is after display of records send mail this reports to mail id selected from table click on mail and other is to save this reports to .xls file thanks
sanjeev
Hello i have need your help regarding if option selected in select box then submit page on select with out click on submit button thanks regards jha
sanjeev
specifically how it's done in ASP.NET? with oracle and access database thanks
sanjeev