Gives error access denied. if i change MSXML2.serverXMLHTTP.4.0 to MSXML2.serverXMLHTTP then it gives error that soapaction. here is my code <%@language=Jscript%> <% var objSrvHTTP; var objXMLSend; var objXMLReceive; var line=""; objSrvHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0"); objXMLSend = Server.CreateObject("Microsoft.XMLDOM"); objXMLReceive = Server.CreateObject("Microsoft.XMLDOM"); objXMLSend.async = false; objFS = Server.CreateObject("Scripting.FileSystemObject"); ReadStream = objFS.OpenTextFile (Server.MapPath("BatchInput.xml"),1,false); //ReadStream = objFS.OpenTextFile (Server.MapPath("Indulis.xml"),1,false); var l=""; while (!ReadStream.AtEndOfStream) { l=ReadStream.Readline(); line = line + l; } objSrvHTTP.setTimeouts(-1,-1,-1,-1) //This is important //If this line is not there it will time out //Before getting error back objSrvHTTP.open ("POST","http://gems/GeneralLedgerTest/Update.asmx",false); //objSrvHTTP.open ("POST","http://aura/GeneralLedger67/Update.asmx",false); //objSrvHTTP.open ("POST","http://localhost/GeneralLedger/Update.asmx",false); objSrvHTTP.setRequestHeader("Content-Type", "text/xml"); objSrvHTTP.setRequestHeader("SOAPAction","http://gems/Sample"); objSrvHTTP.send (line); objXMLReceive = objSrvHTTP.responseXML; Response.ContentType = "text/xml"; Response.Write (objXMLReceive.xml); %> my xml file is <?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> soap:Body <LoadGLRequest xmlns='http://www.gemsgov.com/Request'> <GLTransfer xmlns='http://www.gemsgov.com/Request'> <GLLoadSchema xmlns='http://tempuri.org/GLLoadSchema.xsd'> <GLBatch ORGANIZATION='001' EXSource='OHR' Sequence='0'> <BatchHeader BatchDate='091009' AreaCode='' Operator='OHR' Sequence='1'> <BatchDetails Account='01-00-00-1010-1010-00000 ' Amount='-1214762.58' Description='TEST' GLType='PR' Grant='' Project='' ProjectTask='' WorkorderNumber='' WorkCode='' TransactionDate='082109' AltSource='PR' AltDetail='0001' Sequence='2' /> <BatchDetails Account='01-00-00-1310-0000-00072 ' Amount='6769.25 ' Description='TEST2' TransactionDate='082109' AltSource='PR' AltDetail='0002'
hemrk
Posts
-
MSXML2.serverXMLHTTP.4.0 -
saving data problem when using function for dataadapter and data seti understand that bu the problem now is its not saving the data when i say da.update and ds.aceeptchanges. as when i call the da.update, it goes to da function and initialize evetything so doesnt change values in table. how to do update and acceptchanges to the table
-
saving data problem when using function for dataadapter and data sethave created function in class file. Public Shared Function dsCntrctET() As DataSet Dim sqlCntrct As String = "Select * from CNTRCT_ET where CNTRCT_ID=" & CISCNO Dim cmdCISContract As New OracleCommand Dim daCISCntrct As New OracleDataAdapter Dim dsCISCntrct As New DataSet Dim cmdCISBuilder As New OracleCommandBuilder Try With cmdCISContract .Transaction = myTransCIS .CommandText = sqlCntrct .Connection = cnCIS End With daCISCntrct = New OracleDataAdapter(cmdCISContract) daCISCntrct.FillSchema(dsCISCntrct, SchemaType.Source) cmdCISBuilder = New OracleCommandBuilder(daCISCntrct) With daCISCntrct .TableMappings.Add("Table", "CNTRCT_ET") .Fill(dsCISCntrct) .SelectCommand = cmdCISContract .InsertCommand = cmdCISBuilder.GetInsertCommand .UpdateCommand = cmdCISBuilder.GetUpdateCommand .DeleteCommand = cmdCISBuilder.GetDeleteCommand End With Catch ex As Exception MessageBox.Show(ex.Message) End Try Return (dsCISCntrct) End Function it returns dataset that i can use for getting value from table. but while saving data, i have to use dataadapter for da.update(ds,"table") and ds.acceptchanges. this i have to use in multiple forms as this data comes from 3rd party so i dont want to write this in every form . so i thought how to return data adapter and dataset from the same function. as i wanted to use daCISCntrct and dsCISCntrct. When i am saving data , and i call CISCLASS.daCISCntrct.update(CISCLASS.dsCIScntrct,"Table_Name")..it goes to function and initialize datadapter and not saving new data . it not giving me error but if i look at table, it has all old data where as if i write this code in private sub procedure , its saving data and next time i see new data in the table. Please reply me asap. Thanks in adavance.
-
how to return dataadapter and data set from the same functioni didnt really get you. can you please provide some small example.
-
how return Dataadapter and dataset from function in class file for multiple usei have created function in class file. Public Shared Function dsCntrctET() As DataSet Dim sqlCntrct As String = "Select * from CNTRCT_ET where CNTRCT_ID=" & CISCNO Dim cmdCISContract As New OracleCommand Dim daCISCntrct As New OracleDataAdapter Dim dsCISCntrct As New DataSet Dim cmdCISBuilder As New OracleCommandBuilder Try With cmdCISContract .Transaction = myTransCIS .CommandText = sqlCntrct .Connection = cnCIS End With daCISCntrct = New OracleDataAdapter(cmdCISContract) daCISCntrct.FillSchema(dsCISCntrct, SchemaType.Source) cmdCISBuilder = New OracleCommandBuilder(daCISCntrct) With daCISCntrct .TableMappings.Add("Table", "CNTRCT_ET") .Fill(dsCISCntrct) .SelectCommand = cmdCISContract .InsertCommand = cmdCISBuilder.GetInsertCommand .UpdateCommand = cmdCISBuilder.GetUpdateCommand .DeleteCommand = cmdCISBuilder.GetDeleteCommand End With Catch ex As Exception MessageBox.Show(ex.Message) End Try Return (dsCISCntrct) End Function it returns dataset that i can use for getting value from table. but while saving data, i have to use dataadapter for da.update(ds,"table") and ds.acceptchanges. this i have to use in multiple forms as this data comes from 3rd party so i dont want to write this in every form . so i thought how to return data adapter and dataset from the same function. as i wanted to use daCISCntrct and dsCISCntrct.
-
how to return dataadapter and data set from the same functionhave created function in class file. Public Shared Function dsCntrctET() As DataSet Dim sqlCntrct As String = "Select * from CNTRCT_ET where CNTRCT_ID=" & CISCNO Dim cmdCISContract As New OracleCommand Dim daCISCntrct As New OracleDataAdapter Dim dsCISCntrct As New DataSet Dim cmdCISBuilder As New OracleCommandBuilder Try With cmdCISContract .Transaction = myTransCIS .CommandText = sqlCntrct .Connection = cnCIS End With daCISCntrct = New OracleDataAdapter(cmdCISContract) daCISCntrct.FillSchema(dsCISCntrct, SchemaType.Source) cmdCISBuilder = New OracleCommandBuilder(daCISCntrct) With daCISCntrct .TableMappings.Add("Table", "CNTRCT_ET") .Fill(dsCISCntrct) .SelectCommand = cmdCISContract .InsertCommand = cmdCISBuilder.GetInsertCommand .UpdateCommand = cmdCISBuilder.GetUpdateCommand .DeleteCommand = cmdCISBuilder.GetDeleteCommand End With Catch ex As Exception MessageBox.Show(ex.Message) End Try Return (dsCISCntrct) End Function it returns dataset that i can use for getting value from table. but while saving data, i have to use dataadapter for da.update(ds,"table") and ds.acceptchanges. this i have to use in multiple forms as this data comes from 3rd party so i dont want to write this in every form . so i thought how to return data adapter and dataset from the same function. as i wanted to use daCISCntrct and dsCISCntrct.
-
How to call windows exe with parameter from asp.net.my exe is not on c:\. its on server. besides that its not the question of running. its running from the server but my question is how to pass parameter ?
-
How to call windows exe with parameter from asp.net.I have a problem in asp.net i wanted to call my windows app exe from web app with paramters. its working with process.start(). but i can t see UI of windows app on clients machine. so i wrote javascripr function and its working fine , i can use windows UI on clients side. but now i dont know how to send arguments with that and how to fetch arguments in windows app. Please let me know asap. here is code. < SCRIPT Language="JScript"> function runcmd() { File="C:\\TestParamFromAsp.exe"; WSH=new ActiveXObject("WScript.Shell"); WSH.run(File); //document.getElementById('<%=btnSendMail.ClientID%>').click(); //sInfo=new System.Diagnostics.ProcessStartInfo("C:\\TestParamFromAsp.exe"); //p=new System.Diagnostics.Process; //sInfo.Arguments="12345"; //p.StartInfo=sInfo; //p.Start(); } </ SCRIPT> Codebehind is working independently. Protected Sub btnSendMail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendMail.Click 'Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\CGS_NEWDESIGN_UPDATED\\ContractAutomation\\bin\\ContractAutomation.exe") '("C:\\TestParamFromAsp.exe") Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\Documents and Settings\\hkacholi\\My Documents\\Visual Studio 2005\\Projects\\TestParamFromAsp\\TestParamFromAsp\\bin\\Debug\\TestParamFromAsp.exe") 'Dim sInfo As New Diagnostics.ProcessStartInfo("//vsapps/cgs/ContractAutomation.exe") 'C:\\Documents and Settings\\hkacholi\\My Documents\\Visual Studio 2005\\Projects\\TestParamFromAsp\\TestParamFromAsp\\bin\\Debug\\TestParamFromAsp.exe") 'Dim sInfo As New Diagnostics.ProcessStartInfo("C:\\TestParamFromAsp.exe") ' startInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Maximized Dim p As New Diagnostics.Process 'Diagnostics.Process.Start(sInfo) sInfo.Arguments = "12345" 'Diagnostics.Process.Start(sInfo) sInfo.RedirectStandardOutput = True sInfo.RedirectStandardInput = True sInfo.RedirectStandardError = True sInfo.CreateNoWindow = True sInfo.UseShellExecute = False p.StartInfo = sInfo p.Start() End Sub hemaxi
-
how to get parameter from Asp.net web page to windows formThanks Dave. Its working fine. yes..i was thinking to meet asp team and find out how they are going to call my exe. actually we are working on the same project so there is not security issues as its for our internal office users..so doesnt have to worry about security ..but i dont know whether they are going to pass the parameter commandline or not. anyways do u have any idea how to pass commandline arguments with calling exe from asp .net ?let me know so i can tell them to use that way. Thanks again Hemrk.
-
how to get parameter from Asp.net web page to windows formExcellent..but Where to write...i've main form in solution. and i dont know how the asp.net team is going to call my windows application. is there any other way. Thanks for ur help. Hemrk.
-
how to get parameter from Asp.net web page to windows formNo. Web form is not running in my windows application. both are seperate applications but now we want to merge it. so we decided, instead of writing code again , we call windows application from webpage and pass the parameter. my question here is how to fetch that parameter in windows main form. ex. if i am passing parameter called "ID" with .exe. when windows application is loading that time i need to know "ID" so that i can write code in FORM_Load event to populate other fields from the table for that "ID". Pls. reply asap.
-
how to get parameter from Asp.net web page to windows formhello, i am stuck. i have one web application. i want to pass contract number from my web page and give a link to open my windows form with contract number and search all the details for that contract number and populate it in the forms. so basically i want to pass the parameter from web page to my windows form to populate all the related fields. hemaxi
-
how to create multiple hyperlinks dynamically?I have solved the problem using viewstate. so i didnt use any updatepanel and ajaxtoolkit stuff. it was so simple with viewstate.
-
how to create multiple hyperlinks dynamically?I have button which opens the dialog box to select a filename. the filename with path i am storing in textbox. when i click on the button , i want to create one hyperlink and set its text and navigateurl property to textbox1.text. i can able to create one hyperlink. but i want to create as many hyperlinks as button clicked by the user and textbox is not blank. my code on button click event is Dim HyperLink As HyperLink = Nothing HyperLink = New HyperLink() HyperLink.ID = "HyperLink" & i HyperLink.Text = TextBox1.Text HyperLink.NavigateUrl = "file:///" & TextBox1.Text PlaceHolder1.Controls.Add(HyperLink) PlaceHolder1.Controls.Add(New LiteralControl("
")) This is working for one hyperlink , when i click on 2nd time button , the text changes to textbox1.text but it deletes the 1st hyperlink. i tried Me.Controls.Add(New LiteralControl("<a href = " + HyperLink.NavigateUrl + ">" + TextBox1.Text + "</a>")) but its not working. Please help me as i am stuck here since one week. i dont know how to get rid of this problem. i tried with ajaxextension, but i dont know how to use it. one more thing i dont want to upload , i just want to attach this file to email. and if user wants to see this file he can click on hyperlink and he/she can open from the page and they can see the list of files that they have selected for the attachment. Please help...with the code. Thanks in advance. Hemrk. -
Add Multiple Hyperlink control dynamically on button_click eventI want to browse and choose the filename and set the navigate url property of hyperlink control to that file name dynamically. I can create one hyperlink on button_click event. but 2nd time when i click on button , i can able to select file name but i can not able to create hyperlink control with different id so it append text on hyperlink1 so when i click on hyperlink it is saying can not open this page as it has 2 file names. please help me ..i am trying with ajax update panel..but not able to solve this problem. i am adding hyperlink control to placeholder. hemrk
-
Convert Html file to Jpeg ImageHello there i have html page which contains 1 .jpg image and one table . i want to convert both(combined) to as an image file (.jpeg) so that i can give img src = <*.jpg> . so can anybody has an idea how to do that from vb.net coding. i 've one idea but i dont know how to start. i can transform html file to pdf. and in pdf i can get screenshot and copy and paste to word document as an picture and i can save as .jpeg format but the question is in vb.net which library i should call and do i need pdf writer? or can i use pdf reader? if so how ? i dont want to use third party tool as its a long process in my office .. so pls. help me if nebody has ant idea about that. suggestion are most welcome Thanks in advance. Hemaxi
-
Printout method of word documenti m using vb.net2005 windows application. i've on my computer word 2003 and 2000 both. i've referenced PIA's for word 2003. everything is working fine like bookmark,save,open,add,close. but when i am using printout method , on my pc it is running fine. but i am deploying on server and trying to run from client computer ..it s giving error ..comexeption ..library is not registered and hresult#. Client have word 2000. doesnt have 2003. but all other methods are working in word 2000 . only i m having problem with printout. If somebody know the solution pls. reply me asap. Thanks Hemaxi
-
how to call ORacle function in vb.netHEy Thanks you all for helping me. but now its working..i changed returnvalue boolean to integer. so for sure function and stored proc both are not working when it return type is boolean in vvb.net Thanks neways hemaxi
-
how to call ORacle function in vb.netHey I think som that datatype is the problematic as my stored procedure returns Boolean Datatype. and cmd.parameters.add ("",Oracledatatype....doesnt have boolean type. I m using oracleclient . So , Probably it doesnt support Boolean data type. Below is my stored procedure parameters.. PROCEDURE Add_User_Role ( UserID IN NUMBER , SoftwareID IN NUMBER , RoleNo IN NUMBER , ReturnValue OUT BOOLEAN); my vb code is like this... With cmdUserRoleFunc .Transaction = myTrans .Connection = cnContract .CommandType = CommandType.StoredProcedure .CommandText = "Add_User_Role" End With Dim paramReturnValue As New OracleParameter() paramReturnValue.ParameterName = "@return_value" paramReturnValue.OracleType = OracleType.Int32 ' here want to use boolean but doesnt have in enumeration. paramReturnValue.Direction = ParameterDirection.Output Dim paramUserId As New OracleParameter() paramUserId.ParameterName = "@UserId" paramUserId.OracleType = OracleType.Int32 paramUserId.Direction = ParameterDirection.Input paramUserId.Value = UserId Dim paramSftwrId As New OracleParameter() paramSftwrId.ParameterName = "@SoftwareId" paramSftwrId.OracleType = OracleType.Int32 paramSftwrId.Direction = ParameterDirection.Input paramSftwrId.Value = 42 Dim paramRoleNo As New OracleParameter() paramRoleNo.ParameterName = "@RoleNo" paramRoleNo.OracleType = OracleType.Int32 paramRoleNo.Direction = ParameterDirection.Input paramRoleNo.Value = RoleNo 'cmdUserRoleFunc.Parameters.Add(paramReturnValue) cmdUserRoleFunc.Parameters.Add(paramUserId) cmdUserRoleFunc.Parameters.Add(paramSftwrId) cmdUserRoleFunc.Parameters.Add(paramRoleNo) cmdUserRoleFunc.Parameters.Add(paramReturnValue) cnContract.Open() cmdUserRoleFunc.ExecuteScalar() 'Gives me error here..that illegal variable Pls. Help me..i just wanted to get rid of this problem Thanks anyways, hemaxi
-
how to call ORacle function in vb.netHey I think som that datatype is the problematic as my stored procedure returns Boolean Datatype. and cmd.parameters.add ("",Oracledatatype....doesnt have boolean type. I m using oracleclient . So , Probably it doesnt support Boolean data type. Below is my stored procedure parameters.. PROCEDURE Add_User_Role ( UserID IN NUMBER , SoftwareID IN NUMBER , RoleNo IN NUMBER , ReturnValue OUT BOOLEAN); my vb code is like this... With cmdUserRoleFunc .Transaction = myTrans .Connection = cnContract .CommandType = CommandType.StoredProcedure .CommandText = "Add_User_Role" End With Dim paramReturnValue As New OracleParameter() paramReturnValue.ParameterName = "@return_value" paramReturnValue.OracleType = OracleType.Int32 ' here want to use boolean but doesnt have in enumeration. paramReturnValue.Direction = ParameterDirection.Output Dim paramUserId As New OracleParameter() paramUserId.ParameterName = "@UserId" paramUserId.OracleType = OracleType.Int32 paramUserId.Direction = ParameterDirection.Input paramUserId.Value = UserId Dim paramSftwrId As New OracleParameter() paramSftwrId.ParameterName = "@SoftwareId" paramSftwrId.OracleType = OracleType.Int32 paramSftwrId.Direction = ParameterDirection.Input paramSftwrId.Value = 42 Dim paramRoleNo As New OracleParameter() paramRoleNo.ParameterName = "@RoleNo" paramRoleNo.OracleType = OracleType.Int32 paramRoleNo.Direction = ParameterDirection.Input paramRoleNo.Value = RoleNo 'cmdUserRoleFunc.Parameters.Add(paramReturnValue) cmdUserRoleFunc.Parameters.Add(paramUserId) cmdUserRoleFunc.Parameters.Add(paramSftwrId) cmdUserRoleFunc.Parameters.Add(paramRoleNo) cmdUserRoleFunc.Parameters.Add(paramReturnValue) cnContract.Open() cmdUserRoleFunc.ExecuteScalar() 'Gives me error here..that illegal variable Pls. Help me..i just wanted to get rid of this problem Thanks anyways, Hemxi