Answer Questions
zdrae Locking the transcation
HI May i know how to lock the table when the transaction is make( not just 1 but many transaction) so i can unlock the table after all the transaction has make or error occur. Thanks Why do you want to lock the entire table - you should design an application which will lock as few records for as little duration as possible to avoid locking performance issues. Would you want to lock all the records in the table (say all orders for all customers) when only 1 record (1 order for 1 customer) has chnaged an needs to be updated. dim blnOK as boolean = true BeginTransaction do while true blnok = PostSomeData loop if blnOK then CommitTransaction ...Show All
TheBlackDahlya Accent Characters
Here is the problem. I am accessing data, usually using streamreader, reading a line at a time. The data is in CSV format, so I parse it with the .split. However, a lot of the text contained in the files have the funky characters, such as: 6,"Jose","Grandon","",28, However, when I pull that in, I get Jos Grandn. Which is NOT what I want. Is there any quick and easy way to allow the text to be pulled in correctly Thanks, Larry The problem is that you actually need to know the encoding in order to reliably read the text. By default, the stream reader will assume that the text is UTF-8 encoded. Maybe you could try using the default encoding and pass it in t ...Show All
D. Wood Extending RichTextBox Control
Is there a way to select columns 1 through 10 for all of the rows which have text in them and either cut or copy them to the clipboard or simply delete them Textpad and MS Word support this by holding on the alt key while selecting with your mouse. I am trying to implement this and i am finding suitable way to do this. guys please any one having idea then approach... Thanks in advance. chirag dave I get what you mean now, but a normal RichTextBox's selection only allows a continuous selection, so you're gonna have to add your own selection mechanism. I've got an idea on how to do that, but it's gonna take a little time to get that coded. In short, paint your own focusrectangle, figure out the zLeftMargin ...Show All
jewelfire Editing connection string at run time
I have got two connection strings in my application which I am creating in VB.NET 2005, one whose database is installed with my application so i can keep the connection string and other which is already there with the user. I want the connection string of the other database which i am taking from the customer to be installed in the registry which is fine, the string value is stored in the registry from the customer input. Now how do i get that string as the current connection string as systems.settings.connectionstring is read only Is there any ways this can be done because I am working on this project and it needs to be done somehow I think i will be more specific. In VB.NET 2005, i add a data source to my project which co ...Show All
Keith Vinson Write specific error to a text file?
I have a vb.NET program that sends out emails, and I need it to write to a log file when it can't send emails to certain addresses. I need it to tell me what day/time, and what email address. I'm pretty new and I have never captured errors before. So far, I have the following error block: If _mailCounter.Text < MaxMessages Then 'DONT OVERLOAD MAIL SERVER Try System.Web.Mail.SmtpMail.Send(MM) Catch ex As Exception Err.Clear() End Try End If Any help is appreciated!!! Thanks! Tory Hi Tory; Just configure a trace listener in you application configuration file. Trace listeners can be configured through your application configuration file and turned ...Show All
Vypur Case Usage
I am pretty much a noob programmer, but I'm getting the hold of visual basic pretty much. But in one of my programming attempts something is messed up, because as far as I know my code is good... Take this code: also to fix the user entry problem I did Select Case Textbox1.Text Case Is not integer** The starred is what i want to do, what would be the actual expression to use Case Is Integer= False i tried Case Is Not Integer I tried whats the expression i need to use thanks but one last question If i tried doing a case what would I do (to solve the user entry thing) It says relational operator expected If you use the Catch...Try then in your exception statements, you could set the size value to an acceptable value (for ...Show All
quinet how to add DataSource property to my user control
I want to add DataSource property to my user control. and let me to choose datasource just like DataGridView. Public Class Class1 Inherits UserControl Private uds As DataSet Public Property uDataSource() As DataSet Get Return uds End Get Set(ByVal value As DataSet) uds = value End Set End Property End Class if I use the code above, I can choose dataset at design view but can pass value, the error is: "Object of type 'System.Windows.Forms.BindingSource' cannot be converted to type 'System.Data.DataSet'." What should I do please give me some clues. Thanks! I typed something wrong, but I can't edit. It should be: if I use the code above, I can choose dataset at design view but fail to accept value, ...Show All
KitWest Excel Process Won't terminate
I have seen loads of information on this but none seem to resolve my problem. Here is the situation: I am using Visual Studio 2005 and using SQLBulkCopy to copy a certain range of Excel values into SQL 2000 table. The copy process is successful but I need to have the Excel file opened - otherwise I get "External table is not in the correct format". When I finish the copy I try to release all Com objects but Excel process is still active. I tried changing my connection string, using both Marshal.releaseComObject and Marshal.FinalReleaseComObject. Neither of which are successful. I then began looking at killin the Excel Window that I open by using a GUID. This works but when the user closes the other Excel windows which they hav ...Show All
PankajJSingh Formatting a Cell within a GridView
I want to format a cell within a Gridview for currency....Like I have a cost column and I want that column to be in the format of money like $300.00 but in my Gridview is there a way i can format the cell for this You would expect DataGridView1.Columns(0).DefaultCellStyle.Format = "C2" to work but it doesn't. However if you also add DataGridView1.Columns(0).ValueType = GetType (System.Double) you should find it works ok. ...Show All
tkroll VB6 -> VS2002 -> VS2003 -> VS2005 -> nowhere fast!
So, the upgrade from VB6 to VS2003 was really painful when it happened. A positive thing to note about it is that when you do that one you get big lists of errors and warnings and things that you need to change. If you then take that code and try to upgrade it to VS2005 you get NO warnings and NO errors and, dang it, a lot of things just don't work. It's very frustrating... Ah, really Thanks Ken. I mean. Color me skeptical, of course :) Like, it doesn't exhibit the same behavior that the controls did with 2003 ("You don't have a license") - but it doesn't work in 2005 (the control just randomly goes away, or similar things), that's for sure! Oh, whoa. Check it out.&nb ...Show All
nglow converting datagrid control to html table
I have several datagrid controls in an application i am finishing up on, i need to output the contents to an html file, so i need to convert the datagrid control into a html table, their wouldn't happen to be any easy way of doing this rather then going though cell by cell, extracting the contents and adding it on to a string along with the html code to make it a table is their well from the sounds of it your idea is harder to impliment, i think i'll stick with my idea, i just need some help doing so. Here is my Pseudo Code: - Create a string, start off with the <table> tag - Go though each cell one-by-one - Extract the contents - Wrap the contents in the necessary HTML tags - Append the result ...Show All
pintu17 Memory usage - events
I recently answered a question at VBCity about a memory leakage with VB.Net: "I am creating a class with an Event, then I instantiate the class and dispose of it. VB seems to be wasting 16 bytes each time. " I did some research, and found something really interisting. A small VB.Net application to test this showed that the memory usage slowly increases over time. The object never gets collected. A C# test worked as expected (memory usage increases the 1st time an object is created, and then it stays the same). When I investigated the CLR code for this, I noticed why: C#'s ctor function only created the object, while VB's did the following: IL_0001: call instance void [mscorlib]System.Object::.ctor() IL ...Show All
knji VB2005: Startup Form / Splash Form / Application Startup
Hi, This is driving me nuts, I have a Startup Form defined and a Splash Form defined in the applications properties. in the Application_Startup event, I have some code to do some initial checks, which will then be used throughout the applications lifecycle as well as to change the duration of the splash screen and change some of its contents. Now according to MS's code comment the Application_startup should fire before the initial forms are displayed. This does not happen the Splash form is being called before the application startup is being executed, so it is missing the initial code checks and doesn't do what it should...... Is this a bug what can i do to work around this Cheers, Dave ...Show All
sheldono Reference Listview subitem by name
All, I have a listview in detail view with several subitems. I give each a name and a value add them to my listview item and add my item to the list. All works well. However, When a use clicks on the item (full row selected) i want to get the value of one of these subitems using a reference to its name rather than its index value. I was assuming this was going to be a simple coding task by replacing the subitem index value (lvi.SubItems(3).Text) with the subitem name (lvi.SubItems("MySubItem").Text)...i was wrong...can anyone please help Cheers The subitem can be referenced by key (name) or by index see the following as a sample Private Sub Button1_Click ( ByVal sender As Syste ...Show All
Artil Stop Debugging Now Please
Ever since i installed vb 2005 some of my applications will not run!!! My Mcaffee programs are stopped from running by Just in time debugging finding a "32 bit exception error" this must be disabled how do I do that I dont mind the debugger running with the programs I create but not the ones already on my desktop!!!!!!!!!!!!!!! How do I keep my "terminal Services" on by default so when I start the computer they will be on Now I must always manually reset them Thanks Mitch Unhandled 32 execption in Uni.exe(3084) I would suggest a few things. Tell as the actual exception that is occuring as this may identify what is go ...Show All
