Jump to content
Xtreme .Net Talk

inter

Avatar/Signature
  • Posts

    36
  • Joined

  • Last visited

Everything posted by inter

  1. Anyone has an idea on how to call a remote vbscript from vb.net or C# ? the remote script is on a windows 2003 server. I was trying to do this with vbscript: Set wshController = CreateObject("WshController") Set wshRemote = wshController.CreateScript("C:\TestRemoteMailbox\mailbox.vbs " & userAlias, strComputer) unfortunately this doesn't seem to work...I have tried a lot of things... wsh is standard installed on windows 2003 and a registry entry should exist named "remote" and it's value should be 1. there are no problems with the firewall. So... Can I make it so that I can run a vbscript on a remote computer? calling it from vb.net or C# ? thanks,
  2. Dear, I'm trying to remove a user from active directory... unfortunately this doesn't work....I'm using the code below but this failes... I use the administrator as DirectoryEntry but for some reason it doesn't find the other user in it's child objects.... using System.DirectoryServicesprivate DeleteUserFromActiveDirectory(DataRow in_Gebruiker){ DirectoryEntry AD = new DirectoryEntry(strPathActiveDirectory , strUsername, strPassword) DirectoryEntry NewUser = AD.Children.Find("CN=TheUserName", "User"); AD.Children.Remove(NewUser); AD.CommitChanges(); AD.Close(); } When I use a filter, I DO find the the child object. but then I still can't remove the user... (I think because the remove uses the same search method as the build in "Find") help is more then welcome, thank you,
  3. Sure it is... all you need is the right connectionstring. by the way... you don't use javascript to access databases... you use server side code... asp.net is a good server side technology... in asp.net you can write in VB.net and C# greets
  4. thx for the reply... I've only now seen it.
  5. Any idea how to get a list of windows services that may be on a remote windows machine? I mean the list that you get when typing "services.msc", but of a remote computer.... help is appreciated thx,
  6. Is there a way to see all the services on a remote computer with .net ? thanks,
  7. I've been trying to add a control to the toolbox of VS2005. but I can't get it to work. Is there anyone kind enough to tell me how I should do this? Or give me an example.... preferably for a control for a web environment... I have found the link below but it doens't seem to work. http://dev.devbiz.com/blogs/workingsmart/archive/2005/07/27/adding_controls_to_vs_net_toolbox.aspx The control I use is from this site( but a litle bit modified).... http://www.mredkj.com/vbnet/textboxmaxlength.html help is appreciated! greets,
  8. I thought of doing something like this aswell... but don't know how to terminate a thread. do you ? edit: ok... I found a link: http://www.codeproject.com/vb/net/ThreadDeath.asp I'm going to check it thx for the tip
  9. Hello, I have a for loop. in this for loop I try to perform a command(send1fax). this send1fax command sometimes doesn't work and keeps on trying to send. I would like to have some sort of a time out.... if send1fax hasn't finished in 30 seconds... then go to the next in my for loop. for blabla to allfaxes send1fax("555 55555") next I can NOT change the code in the send1fax function. I can only programme around it. can anyone help ? thx,
  10. I want users to create there own reports. I have visual studio 2005. and mysql. how can I manage this? help is appreciated thx,
  11. possibilities, creating reports with vb 2005 Ok.. I have seen in vs studio 2005 that I can make reports without having anything special installed. I created a dataset by connecting to mysql. and dragged and dropped a field from the dataset on to the report. with the report viewer it even gives a nice green whirl before it creates the report :-p My question. Does anyone know a tutorial for using these reports? and maybe an important question aswell. Is it possible to create the reports dynamicly, just by code? thx,
  12. Dear, Someone I know has an access application. this app generates reports. He asked me to reprogramme it to .net. I will probably use a mysql database , but I still need to create reports. what is the cheapest/best way to do this in a vb.net desktop application? thx,
  13. something very odd... I have installed visual studio 2005 on my machine. I created a console application with visual basic 2005. I typed something in. tried to delete.. but i couldn't :confused: I can't use enter, delete or tab for some odd reason.... this works perfectly fine with visual studio 6 and visual studio.net 2003 on the same machine :confused: what is this?
  14. what is the best free GUI for mysql anyway ?
  15. already solved it... thx. that is the way I did it too ;-) no * in the delete statement ;-)
  16. Hello, I have an insert query that works on mysql and another delete statement that doesn't seem to work when executing on mysql..... the problem is with the datetime I think..... this works: sql = "insert into tblchat (tijd, tekst, naam) values (str_to_date('" & now & "','%d/%m/%Y %H:%i:%s'),'" & gesplitst(0) & "','" & gesplitst(1) & "')" this doesn't work: sql = "delete * from tblchat where tijd < STR_TO_DATE('" & dateadd("s",-5,now) & "','%d/%m/%Y %H:%i:%s') " I don't understand why...Is the delete statement wrong syntax???? greets, Inter EDIT: this code did work on an access database but instead of STR_TO_DATE I used cdate.
  17. I've got it working
  18. OK... I added .size = "100" to the with clausule of SORTKEY now I don't get an error... but not yet a result..... just "press any key to continue" (I should have atleast 50 records) edit: should have 2 results
  19. I changed it but I get the same error copied the same message from above but the parameters are first configured and then added to the command. Help is welcome... ------------------------------------------ PLS-00306: wrong number or types of arguments in call to 'NAMECALL' ORA-06550: line 1, column 7 PL/SQL: statement ignored I don't know what causes this error. I know the existing stored procedure is being used by other programmes so the error can't be in the stored procedure... this is the code I have Sub Main() Dim OracleConn As New OracleConnection Dim Oracmd As New OracleCommand Dim Oradr As OracleDataReader Dim name As New OracleParameter Dim firstname As New OracleParameter Dim sortKey As New OracleParameter With name .ParameterName = "NAME" .OracleType = OracleType.VarChar .Direction = ParameterDirection.Input .Value = "lastname" End With With firstname .ParameterName = "FIRSTNAME" .OracleType = OracleType.VarChar .Direction = ParameterDirection.Input .Value = "firstname" End With With sortKey .ParameterName = "SORTKEY" .OracleType = OracleType.Cursor .Direction = ParameterDirection.Output End With OracleConn.ConnectionString = "Data Source=database;User ID=user;Password=password" With Oracmd .Connection = OracleConn .CommandType = CommandType.StoredProcedure .CommandText = "NAMECALL" .Parameters.Add(name) .Parameters.Add(firstname) .Parameters.Add(sortKey) End With Dim i As Integer Try OracleConn.Open() Oradr = Oracmd.ExecuteReader() While Oradr.Read For i = 0 To Oradr.FieldCount - 1 Console.WriteLine(Oradr(i).ToString & " ") Next End While OracleConn.Close() Catch ex As Exception Console.WriteLine("***** : {0}", ex.Message) Finally OracleConn.Close() End Try End Sub the stored procedure looks something like this procedure NAMECALL(name in VARCHAR2, firstName in VARCHAR2, sortKey out VARCHAR2) IS input VARCHAR2(71); output VARCHAR2(71); finalOutput VARCHAR2(71); BEGIN ///////rest of the code ////// sortKey := finalOutput; END NAMECALL;
  20. hey plausible, I did it but I get an error.... PLS-00306: wrong number or types of arguments in call to 'NAMECALL' ORA-06550: line 1, column 7 PL/SQL: statement ignored I don't know what causes this error. I know the existing stored procedure is being used by other programmes so the error can't be in the stored procedure... this is the code I have Sub Main() Dim OracleConn As New OracleConnection Dim Oracmd As New OracleCommand Dim Oradr As OracleDataReader Dim name As New OracleParameter Dim firstname As New OracleParameter Dim sortKey As New OracleParameter OracleConn.ConnectionString = "Data Source=database;User ID=user;Password=password" With Oracmd .Connection = OracleConn .CommandType = CommandType.StoredProcedure .CommandText = "NAMECALL" .Parameters.Add(name) .Parameters.Add(firstname) .Parameters.Add(sortKey) End With With name .ParameterName = "NAME" .OracleType = OracleType.VarChar .Direction = ParameterDirection.Input .Value = "lastname" End With With firstname .ParameterName = "FIRSTNAME" .OracleType = OracleType.VarChar .Direction = ParameterDirection.Input .Value = "firstname" End With With sortKey .ParameterName = "SORTKEY" .OracleType = OracleType.Cursor .Direction = ParameterDirection.Output End With Dim i As Integer Try OracleConn.Open() Oradr = Oracmd.ExecuteReader() While Oradr.Read For i = 0 To Oradr.FieldCount - 1 Console.WriteLine(Oradr(i).ToString & " ") Next End While OracleConn.Close() Catch ex As Exception Console.WriteLine("***** : {0}", ex.Message) Finally OracleConn.Close() End Try End Sub the stored procedure looks something like this procedure NAMECALL(name in VARCHAR2, firstName in VARCHAR2, sortKey out VARCHAR2) IS input VARCHAR2(71); output VARCHAR2(71); finalOutput VARCHAR2(71); BEGIN ///////rest of the code ////// sortKey := finalOutput; END NAMECALL;
  21. I have a query in my code. I use this query to fill a dataset..... and with another query I fill a datareader. but instead of a query I want to use a stored procedure from oracle how do I call this stored procedure and fill my dataset and/or datareader? thx
  22. as a string. but i have put to_date(date,'dd/mm/yyyy') around the date... now it works ...
  23. the country date format was set to american at the users computer while it was different on my computer thx
  24. Hello, I have made an application where I execute an sql statement to the database. I have 3 sql statements. 1: I do a count for people based on the name 2: I do a count for people based on birth date 3: I do a count for people based on ID. All 3 queries work in the database and also in my application on my computer. I use executescalar in the application. But I have made a package to install on other computers. and when I start the programme on other computers... everything works Except for the second query .... there i execute a sql statement, in this stament I look for people based on the BIRTH DATE... this is my query: it works on my computer but not on the computer of someone else :s ... Can anyone help ???? I get the next exception :s An unhandled exception has occured in your application. if you click Continue, the applicaiont will ignore this error and attempt to continue. if you click Quit, the application will be shut down immediately. ORA-01843: not a valid month
×
×
  • Create New...