Jump to content
Xtreme .Net Talk

teixeira

Avatar/Signature
  • Posts

    96
  • Joined

  • Last visited

About teixeira

  • Birthday 04/10/1985

Personal Information

  • Occupation
    .NET Programmer (VB.NET,C# & ASP.NET)
  • Visual Studio .NET Version
    VS.NET Enterprise Architect and now VS2005 Beta2
  • .NET Preferred Language
    VB.NET,C#,ASP.NET

teixeira's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello i would like to make in C# a custom driver for printing like HylaPrintMon.dll which is a driver to "print" (send) faxes through HylaFax. The driver is open-source but in C++ and i don't undestand a piece of it. This is a DLL that is called when we send to print something at a specific port, and it prompt some windows forms such as Username, server, pwd, number to faxing etc and i would like to make a custom forms on my own to customize it. Any help will be gratly appreciated.
  2. Thanks for post. I never had in mind that i could make thi stuff using TCPIP socket comm to interchange information among service and windows app. I'll implement that. Best regards, Tiago Teixeira
  3. Hi, I need to write a windows service to run on windows 2003 server and I'm thinking in create the service and when the user logs in the computer at the startup folder I'll launch an UI application that interacts with the service using the MSMQ for have its status. Is this a good idea? does anyone have a better suggestion? one thing, a service that runs in windows xp with "interact with desktop" option checked doesn't behave in the same way in windows 2003 server, that's the reason i found MSMQ a possible way to do the communication between service and desktop. Thannks, Tiago Teixeira
  4. Hi, I have one suggestion to made, if this is possible for what you want. When i need to use CR inspite of link directly the datasource to an .MDB or SQlServer or whatever, i create a dataset (in desing mode), imagine your using VS2005, in this dataset i create the tables i need. I just create this dataset for have a structure, for have fields to build my report design. After i my .NET code i create my business logic objects, and i create a dataset/datatable with the same fields name i put in the previously designed dataset, and i just do something like this: CrystalReport1 rpt = new CrystalReport1(); rpt.SetDataSource(myDsReturnedFromBOLayer); At least, with this, i don't get annoying errors like this one you reported. And i have all inside my .NET code, i manage all in one place. I hope it can help u your give you any idea. Best regards, Tiago Teixeira
  5. Hi, I think yes, you can open a port in your firewall to be forward to the internal sql server ip address,and after inside your SQL Server managment software you provide de ip adresss and the wan router will forward the request to the server. SqlServer must be configured to accep remote connections. You can check this link : http://support.microsoft.com/kb/914277 I hope this can help you. Best regards, Tiago Teixeira
  6. Great! Thanks, it was that explanation i needed. Best regards, Tiago Teixeira
  7. PlausiblyDamp thanks, "Unconscientiously", i follow the same guidelines as you, i treat as much as i can the exception in my .net code, because its more quick, and i prefer control all in one place. But for instance, imagine that i create a stored procedure and an error occurs inside, how can i pass that info to my C# code? Normally it raises the error but my .NET code isn't notified. Any idea how to pass back the error indication to my code in the client application? if i use a simple sql command from my net code it raises the error if any, but not with Store Procedures. Tiago Teixeira
  8. Hi, If your datagrid's datasource is an DataTable, you can use a DataView to filter rows and have the rows Count. Example: DataView dv = new DataView((DataTable)yourDataGrid.DataSource,"CheckedColumnName = True ", "CheckedColumnName",DataViewRowState.CurrentRows); int checkedRowsCounter = dv.Count; Console.WriteLine(string.Format("Checked Rows = {0}",checkedRowsCounter )); OR you can spend more time and code and write a FOR EACH statement instead like: int counter = 0; foreach(DataGridViewRow dr in myDataGridView.Rows) { if ((bool)dr.Cells["myCheckBoxColumnName"].Value == true) { counter++; } } //output Console.WriteLine(counter.ToString()); i hope it helps, Best Regards, Tiago Teixeira
  9. Hi, You can use the SerialPort Component of Net Framework 2.0. or you can use other pretty good classes for Serial Port reading, like in these sites: http://www.codeworks.it/net/VBNetRs232.htm http://www.codeproject.com/dotnet/DotNetComPorts.asp http://www.freevbcode.com/ShowCode.asp?ID=4666 After use one these classes, you define: -Baud Rate (usually 9600, but u should read the balance manual) -Parity (usually none) -Data Bits (usually 8 data bits) -Number of Start Bits (1 bit) -Port Number normally these are the requested parameters. After that, you should subscribe the event that will handle the received data from you balance, and you got the info received from com port. Suggestions: -Use hyperterminal to check correctly the settings of the balance and the com port number. -If you're using a USB<->RS232 Adapter be sure that this works well with the balance, normally in the industrial equipments these adapters are not fully compatible sometimes. -Clear allways the buffer, before you read again new info from the serial port, to ensure you're not read garbage. I hope this can help you. Best regards, Tiago Teixeira
  10. Hello, I passed that situation too, and i got PDFTK tool to solve that. Download it here :http://www.pdfhacks.com/pdftk/pdftk-1.12.exe.zip after you call pdftk.exe and pass it the parameters for watermark printing. The program uses, the original pdf file and the watermark pdf file that will produce the final pdf watermarked. Besides wtermark feature, with this you can set pwds, encriptions, etc. pretty nice tool, indeed. a simple example how i call it from my C# code: ProcessStartInfo startInfo = new ProcessStartInfo("pdftk.exe"); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.Arguments = "\"C:\\Temp\\MyOriginalPdfFile.pdf\" background "C:\\Temp\\MyWatermarkPdfFile.pdf\" output \"C:\\Temp\\MyFinalWatermarkedPdfFile.pdf\""; Process.Start(startInfo); I hope it can help u. best regards, Tiago Teixeira
  11. Hello, I've some doubts about error handling in sql server 2005. I'm confused about what to do, for example: should i use BEGIN TRANSACTION ... BEGIN TRY...END TRY BEGIN CATCH... END CATCH.....COMIT ...ROLLBACK... END inside the procedure and i get my sql execution prevented from any exception, but the SqlClient Connector doesn't know what happen, or should i have no error handling inside the procedure, and make the transaction inside my C# code, using SQlTransaction Class?? what is the best practice/advice about this, to catch all the errors, commit or roolback actions and have that information available at SqlClient Connector level in my client application ? TIA, Tiago Teixeira
  12. Hi, It starst its own transactions, but if we specify that syntax inside the procedure use T-SQL "Transaction" reserved word, right? or it starts an implicit transaction in any SP we create even we don't use explicitly declare de T-SQL "Transaction" reserved word? Best regards, Tiago Teixeira
  13. Hello, Is it possible to make an SqlTransaction having a strored procedure as my sqlcommandtext ? In the examples i've seen people just use transactions with sqlcommandtext containing UPDATE, DELETE or INSERT code. Is it possible? TIA,
  14. With your help Nerseus providing the name of the apis i found a great ready to use piece of code at Codeproject.com here's the link if someone else need: http://www.codeproject.com/cs/miscctrl/CsMsgBoxTimeOut.asp?df=100&forumid=90151&exp=0&select=947436 Best regards, Tiago Teixeira
  15. Hi, sure i understand that you can't expose the code. I'm used to deal with apis but make a deeper search using the keywords you gave me to try to solve my problem. Thanks a lot, Teixeira
×
×
  • Create New...