Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
92% Quality Score
Upvotes Received
14
Posts with Upvotes
13
Upvoting Members
10
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
3 Endorsements
Ranked #486
Ranked #585
~69.4K People Reached

91 Posted Topics

Member Avatar for fugio

have a look a this: [http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.update(v=vs.110).aspxClick Here] You might want to define your da and you dt at the module level and use the builder to create update sql command.

Member Avatar for Amudhambika
0
4K
Member Avatar for PerplexedB

The following (see the full code below) successfully adds a page in a section in Onenote. What I don't seem to be able to do is to get the lastly created page on top of the section. Here's the code that is puzzling me. onenoteApp.GetHierarchy(sectionId, OneNote.HierarchyScope.hsPages, out string xmlPages); var …

Member Avatar for PerplexedB
0
861
Member Avatar for PerplexedB

I prepare a table in Excel within a Using () statetement. At the end I UsedRange.Copy() to what I understand is the clipboard. Then I Selection.PasteExcelTable in a Word document. I get an COM Exception "command failed". When I activate the word document and press Ctrl+V the table gets copied. …

0
344
Member Avatar for PerplexedB

When I execute this progammatically, I get a table with row heights much larger than when I do this manually. Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table. public void AddClipboard() { Sel.PasteExcelTable(false,false, false); var t = Sel.Tables[Sel.Tables.Count]; t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent); }

Member Avatar for PerplexedB
0
650
Member Avatar for PerplexedB

Hi have this code that runs well for me. It's part of my WordWrapper where Sel is defined as the Selection object. I tried to save `Sel.Font to a var f` variable, and reset `Sel.Font = f`before exit, but that does not work. "Value out of range". /// <summary> /// …

Member Avatar for PerplexedB
0
428
Member Avatar for Papa_Don

This is definitely a double dot problem. You need to wrap the Excel object and implement the IDisposable interface in the wrapper. You also need to release the each Excel.Object you create. A minima you need the code I'm exposing below. ` Imports Microsoft.Office.Interop Public Class clsExcel Implements IDisposable Public …

Member Avatar for Papa_Don
0
5K
Member Avatar for Andre_5

Assuming your Persons have (one or more) Orders, you probably want to add an Orders (as List(Of Order)) property to your Person class. You will then be able to Json you Persons. Let me know if my assumption is correct.

Member Avatar for PerplexedB
0
3K
Member Avatar for PerplexedB

I cannot find anything in phpExcel documentation. What I would like is to end up with an associative array with keys from the first row in the excel worksheet. It's something that can be done of course, but is there a native method?

Member Avatar for Martin_10
0
2K
Member Avatar for PerplexedB

I'm using Excel interop and it seems that this functionality needs to run in the User Interface thread. So I execute that from the ProgressChanged backgroundworker event. Is there a way to have the dowork event (that invoked the progress changed event) interrupt execution until the ProgressChanged event is finished? …

Member Avatar for gusano79
0
2K
Member Avatar for PerplexedB

I have this Linq expression that works well. What is the right approach to test if it has returned anything? internal static void getCreditNotes(string invoiceId, out DataTable creditNotes,out double total) { total = 0; creditNotes = new DataTable(); var q = dt.AsEnumerable(). Where(r => (string) r["invoiceId"] == invoiceId && (string) …

Member Avatar for PerplexedB
0
217
Member Avatar for PerplexedB

I may be very wrong, but in the web world, just installing Bootstrap gives you some basic control over how you controls look. Is there something similar for WPF? I don't seem to find anything, I have a very basic little wpf application with a pageframe, buttons, textblocks and textboxes. …

Member Avatar for PerplexedB
0
264
Member Avatar for PerplexedB

I have this control on my (wpf)form Status <TextBlock x:Name="Status" HorizontalAlignment="Left" Margin="138,0,0,0" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Grid.ColumnSpan="3" Height="67" Width="577" Grid.Row="1" IsHyphenationEnabled="True" UseLayoutRounding="False"/> It seems that just setting Status.Text=someValue from within a click event does not refresh until the event is completed. How can this be done (in C#) if one wants …

Member Avatar for ddanbe
0
148
Member Avatar for martin3885

Are you using System.Linq.Dynamic; assuming it exists in your VS. It does not exists in my VS2012 (as far as I have checked). You can download it from here : [Click Here](http://weblogs.asp.net/scottgu/dynamic-linq-part-1-using-the-linq-dynamic-query-library)

Member Avatar for martin3885
0
1K
Member Avatar for QuickBooksDev
Member Avatar for PerplexedB
0
640
Member Avatar for PM312

I use interop from vb.net 2008, and they work fine with office 2007 all the way to 2013 included. Not sure about 2003 though. Why do you think you need 14.0 object library?

Member Avatar for PM312
0
1K
Member Avatar for jared.geli

Your payment_apply JOIN does not have a filter. I hope for your sake that that is your problem, otherwise you should rethink your logic from scratch.

Member Avatar for jared.geli
0
243
Member Avatar for Patrick_3

You can execute the code that triggers the exception in the caller routine between the instantiation of the form and the show(). If the error is triggered, you can then not call the show event. Not sure how "kosher" this solution is but it would be something like this: dim …

Member Avatar for PerplexedB
0
244
Member Avatar for lordcar
Member Avatar for airhalynn101

Can't you just compute the total at the moment you populate the fields based on the values that are passed by the dgv? The values are probably kept as numeric values no, so you could set the total textbox with the total, formatted as you choose.

Member Avatar for PerplexedB
0
462
Member Avatar for rtirak

Well, I think that what this is trying to tell you is that you are supposed to pass the column number (the zero based sequence) into getstring. Here's the definition of [GetString](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getstring(v=vs.110).aspx) 'Declaration Public Overrides Function GetString ( _ i As Integer _ ) As String

Member Avatar for PerplexedB
0
533
Member Avatar for Bendez Thyna

Not sure how helpful this is going to be for you but here is how this looks in one of my projects (called B040) Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.b040.frmMain End Sub

Member Avatar for Bendez Thyna
0
618
Member Avatar for deceptikon

.. then there is the question, do we have to take into account that the users can enter separators like "/" or "-". It wouldn't make it much more complex, but if that is not in the picture (because the imput field is made numeric only) then there is no …

Member Avatar for ddanbe
1
583
Member Avatar for Gus_19

I may be very wrong, but it seems to me that you are testing an awful lot of times (the number of persons x the number of events) whether `Incident_Type.text = "Party"` and `"Event_Assoc1.text <> "Guest"` Unless I'm missing something major, or you are not telling us something this : …

Member Avatar for PerplexedB
0
241
Member Avatar for Nebil

I think it would be more elegant to use the HTML5 placeholder approach, where if there is no value in the table, you would put something like "put a value", and make sure at validation of the textbox that a correct value was entered, or delete whatever was there. If …

Member Avatar for Reverend Jim
0
161
Member Avatar for riayas

Instead of filling the detail tableadapter in the load event of the form, you could do that in the "RowEnter" event of the header datagridview. You need to pass the key to the detail tableadapter. You will find the the key in `DataGridView.CurrentRow.Cells("keyfiedColumnName").value.` Let us know if you need help …

Member Avatar for PerplexedB
0
262
Member Avatar for airhalynn101

You define `a` as a `date` in line 7, you should not be surprised that it cannot accept a .`tostring` expression no?

Member Avatar for airhalynn101
0
6K
Member Avatar for PerplexedB

I have a form with a dgv on it. The dgv has 1 column defined as a DataGridViewCheckBoxColumn. I would like this dgv to behave as a radiobutton group, i.e. when I click on one cell, that should be set to true, and the others to false. I've got it …

Member Avatar for PerplexedB
0
246
Member Avatar for airhalynn101

The checkboxcolumn is rather straightforward. I'm not sure that is your problem. Is your datagridview bound? If so you need to bind the CheckBoxColumn to a boolean variable. Otherwise if you can see in the cell's value property if the checkbox was checked or not. Let us know if this …

Member Avatar for airhalynn101
0
6K
Member Avatar for ondegotariq
Member Avatar for rahulzephyr

I like tooltips if that works for you. You set this in the form's load event. ` ToolTip1.SetToolTip(Button1, "This is a tooltip")``` Mind you this is VB. I would be very much surprised that it is different in c#. Let us know if this helps, and if we can be …

Member Avatar for rahulzephyr
0
218
Member Avatar for bloomineck

Well one way would be to add an "<all>" options in the itemlist of the comboboxes, and set that as the default. You would have to adjust your sql to take into account those "<all>" entries in your parameters (mostly by not including the corresponding filtering clause). Please let us …

Member Avatar for PerplexedB
0
100
Member Avatar for PerplexedB

I have this routine that works in outlook 2010 but not in outlook 2013 (365). ` Public Sub readTextFile(oFolder As eFolder) If oFolder = NotSupported Then Exit Sub If oFolder = Inbox Then ActiveExplorer.CurrentView = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Views("MgInbox") Else ActiveExplorer.CurrentView = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderSentMail).Views("MgSentMail") End If Dim oTV As Outlook.TableView Set oTV = ActiveExplorer.CurrentView …

Member Avatar for PerplexedB
0
388
Member Avatar for jared.geli

Wouldn't changing `cc=cc+1`on line 21 into `cc=cc+iif(cc=1,2,1)` do what you want? In a zero based logic you will put your valuese in columns 0,1,3 and 4. If you'd allow me, I'd suggest that you be slightly less cryptic in the way you name your variables. There's no extra charge for …

Member Avatar for jared.geli
0
211
Member Avatar for pebryan

Assuming you would want your grid to display the pengguna of which you entered the name in some textbox, you could use the following routine (you would call the sub as `setGridToPengguna(nameTextbox.text)` Private Sub setGridToPengguna(name As String) Dim rowIndex As Integer = 0 For Each r As DataGridViewRow In dgv.Rows …

Member Avatar for pebryan
0
2K
Member Avatar for theashman88

You must have a problem somewhere else, because I took your code as is, and it compiled and ran fine. Hope this helps and good luck.

Member Avatar for samsylvestertty
0
483
Member Avatar for rizwan anjum

It may also be useful to point out that polymorphism is a characteristic of your design, whereas inheritance is a feature of your development system. For exammple when in winforms, you drag a button and a texbox on your form, ***you experience polymorphism***. This is made possible because both textboxes …

Member Avatar for Loosipher
0
169
Member Avatar for Ali_khan11

This routine will give you the correct string to add to your sql. You do need to convert the input text into a valid date variable butt this approach will work no matter what your regional setting is or in which format your user entered the date. Shared Function cDateForJet(ByVal …

Member Avatar for stultuske
0
1K
Member Avatar for PerplexedB

Until now I've been replacing Enter key behaviour in controls (in base classes) with Tab key behaviour with the following code in the keypress event handler : If e.KeyChar = Chr(13) Then SendKeys.Send(vbTab) e.Handled = True End If Although it's worked for me until now, I have serious doubts about …

Member Avatar for Reverend Jim
0
1K
Member Avatar for lavanya uppala

Frankly, I don't see how you can do this without a loop, but here is one solution : Sub Main() Console.WriteLine(removeFirstTwoWords("word1 word2 word3 word4")) Console.ReadKey() End Sub Function removeFirstTwoWords(s As String) As String Dim a() As String = Split(s, " ") Dim result As String = "" For i As …

Member Avatar for PerplexedB
0
1K
Member Avatar for nikiki

Hey there again: How's this? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { string name = "Firstname Lastname"; string code = generateCode(name) ; Console.WriteLine("Code : " + code); Console.ReadKey(); } private static string generateCode(string n) { string[] …

Member Avatar for Momerath
0
189
Member Avatar for Nebil

Does this `Dim dr As OleDb.OleDbDataReader = GetData(qry)` compile at all? I don't think GetData does what you think it does. You need to use an oledbCommand, connect to your database, link the connection to the command and submit your query to the command which may eventually produce a datareader. …

Member Avatar for PerplexedB
0
1K
Member Avatar for ahmadzina85

Have you tried if application.doevents works for you? I've never used it in vb.net, but in vba it would do what you expect. Look at the documentation here : http://msdn.microsoft.com/en-us/library/system.windows.forms.application.doevents(v=vs.110).aspx Not sure it's "best pactices" though. You're better off use threads and the "backgroundworker". See if this http://msdn.microsoft.com/en-us/library/vstudio/system.componentmodel.backgroundworker works for …

Member Avatar for Reverend Jim
0
389
Member Avatar for mrkm1188

You can set the attributes in vb.net. Have a look at this: http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.attributes(v=vs.110).aspx You could write a program that goes through all your folders and set that attribute.

Member Avatar for Reverend Jim
0
188
Member Avatar for PerplexedB

I have a textbox and a label bound to the same member via a bindingsource. I would have expected that at some point when the user changes the textbox, the label would be refreshed, yet it is not. What am I missing here?

Member Avatar for PerplexedB
0
176
Member Avatar for TarkiB

It looks like the update command was not created in lawyerList. Check lawyerList.UpdateCommand. If that is empty, then you should create an sqlCommandBuilder(lawyerList) and execute its GetUpdateCommand() method before your call to Update, or in a constructor. Hope this help and good luck.

Member Avatar for PerplexedB
0
1K
Member Avatar for nikiki

I agree with cgeier that your structure is not optimal, but let's assume that it is good enough for what you are trying to do. So the structure of the text file seems to be that for each entry there are three lines, one that starts with a "-" and …

Member Avatar for ddanbe
0
291
Member Avatar for Gus_19

Have you thought of checking `PFC_Xpress.Tables("EVENT INFO").Rows.count` to check if there are any rows in your table?

Member Avatar for Gus_19
0
389
Member Avatar for nikiki

Have a look at the code below, and see if that works for you, and if not, let us know why. Thanks and good luck. using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { makeTexfile(); Boolean ok = checkUser("name1","password1"); if …

Member Avatar for PerplexedB
0
194
Member Avatar for Gus_19

Between the instantiation of the child form and the call to the show you can set the top and the left properties of the form. The top would be approximately the sum of the top-of-the-parent- form and the height-of-the-parent-form. I guess that the form's top and height are available, otherwise …

Member Avatar for Gus_19
0
179
Member Avatar for Firstgamefreak

You're ok. Assuming your code works. The idea of having the user downloading the ole connection provider is really very good (in fact I might steal that from you :) ). If you know that the provider is not installed, then why not install it, there is not really a …

Member Avatar for Firstgamefreak
0
305

The End.