Search:

Type: Posts; User: cory_jackson

Page 1 of 13 1 2 3 4

Search: Search took 0.33 seconds; generated 49 minute(s) ago.

  1. Re: Simple SQL Index rebuild command failing: Incorrect syntax near the parameter nam

    It's because one can't parameterize identifiers.

    I swore I tested this, but obviously I did not. And I knew this about table names so it shoudl have been obvious.
  2. Re: Simple SQL Index rebuild command failing: Incorrect syntax near the parameter nam

    Doesn't work:
    Declare @IndexName varchar(20) = 'PK_Accounts'
    Declare @IndexTable varchar(20) = 'Accounts'
    Alter INDEX @IndexName ON @IndexTable REBUILD

    Does work:
    Alter INDEX PK_Accounts ON...
  3. Re: Simple SQL Index rebuild command failing: Incorrect syntax near the parameter nam

    I tried adding the parameter with the @ as well.
  4. [RESOLVED] Simple SQL Index rebuild command failing: Incorrect syntax near the parameter name.

    My simple maintenance program stopped functioning.
    My command string is "Alter INDEX @IndexName ON @IndexTable REBUILD" with
    comm.Parameters.Add("IndexName", SqlDbType.VarChar).Value = Index.Name...
  5. How to make two user Dbs appear under the same connection in SSMS

    In SSMS Object Explorer I see my Db under Databases. If I right click the Databases branch and create a new Db it appears next to the extantant Db. This is what I want, but if I close the connection...
  6. Re: [RESOLVED] DateTimePicker not binding to My.Settings

    Now I still don't get it. I want to start it as unchecked. So it defaults to the current date and time in the display. If I check the box, it then saves that value to the Settings overwriting the one...
  7. Re: DateTimePicker not binding to My.Settings

    Disregard. I discovered it needs to be checked.
  8. Re: DateTimePicker not binding to My.Settings

    Update. In a test program I got it to bind to the setting, but it displays the current day instead of the value.
  9. [RESOLVED] DateTimePicker not binding to My.Settings

    I added a DateTimePicker. I bound the Value property to a Application Setting of type Date. I set a default value of 2000-01-01. I run the program and it displays the current date and time. If I...
  10. Re: Ideas for handling large CSV files with malformed lines

    Well the one bad line I was mainly mentioning is 20,000 lines long. I can make some samples later today though.
    Please understand I am not looking for a method where the program fixes the lines....
  11. Ideas for handling large CSV files with malformed lines

    I have a program that routinely extracts data from a 237 MB CSV directly to memory with many columns and over half a million lines using TextFieldParser. The creator of the file generator was sloppy...
  12. Re: Problem reading an saving ANSI en dash

    It was working as was. After the other issues I forgot I specified ANSI 1252 in my Excel Query to troubleshoot. I changed to UTF-8 and it works perfectly now.
    THank you all for your help.
  13. Re: Problem reading an saving ANSI en dash

    ChrisE that encoding works also. My editor mistook it as UTF-8 but as soon as I switch to 1252 it displayed perfectly. Though I'll probably stick with UTF-8 BOM output.
    Now I need to figure out...
  14. Re: Problem reading an saving ANSI en dash

    Dim strContents As String
    Using sr As New StreamReader("A:\Example.txt", Encoding.GetEncoding(1252))
    strContents = sr.ReadToEnd
    End Using
    Using sw As New StreamWriter("A:\out1.txt", True,...
  15. Re: Problem reading an saving ANSI en dash

    Oh, and I did read it. And example all in in C#. Every one I tried to convert resulted in the Intellisense complaining that no overloads supported that.
    Mainly I'm not getting the encoding. I know...
  16. Re: Problem reading an saving ANSI en dash

    Good point on Path.Combine. I forget that one as I don't work with files often. This was just a quicky test. And I was in a hurry.
  17. [RESOLVED] Problem reading an saving ANSI en dash

    I read in this ANSI (1252) file using
    Using sr As New StreamReader(fiFile.FullName, Encoding.GetEncoding(1252))
    Looks good. If I copy and paste from the debugger then en dash 0x96 is present. ...
  18. Re: How does one loop through each parameter name in an object?

    Niya's example was exactly what I was hoping for. Thanks Niya!

    I started to read about reflective programming. Thanks for sharing Shaggy. I'm going to read more later when I have time.
  19. Re: How does one loop through each parameter name in an object?

    Thank you respondents. I'll review the code example tomorrow during work hours. Looks promising.

    I don't know what reflection is, sorry.
    They would change because the requirement would change....
  20. Re: How does one loop through each parameter name in an object?

    I'm sorry. I meant properties of an object I created. It has many string, date, and decimal properties.
    I was just thinking it would be better to loop through them and make a header string for my...
  21. [RESOLVED] How does one loop through each parameter name in an object?

    I want to create a header for an output file that will change if the name changes in the object.
  22. How to get HttpWebRequest.Timeout to work with a proxy

    A HttpWebRequest times out at 100 s by default. If I set the Timeout property to 10 s, it behaves as expected. If I do they same with a WebProxy, the connection times out at 100 s. Apparently the...
  23. I did a bad thing but want to learn how it worked

    Delete from Accounts where ID in (Select ID from Temp)
    I messed up on a process containing this step but the outcome is weird and I'd like to understand what happened.
    I had changed the columns in...
  24. Re: Double click .SQL file open in extant instance in SSMS

    Interesting side note is that drag-and-drop doesn't work for me unless it's running as an admin.
  25. Re: Double click .SQL file open in extant instance in SSMS

    I tried running as admin just now and it's no difference.
    Drag and drop is a good idea, however what I'm really after is being able to click on a link to a file in an Outlook task. I tried to drag...
  26. Double click .SQL file open in extant instance in SSMS

    Do you have a quick link or instructions for how to change the DDE so that when I double click on a SQL file that it opens in the extant instance instead of opening a new instance of SSMS? I've tried...
  27. Re: [RESOLVED] FileIO.TextFieldParser fixed width too long

    Unfortunately PeekChars doesn't work. According to Microsoft newline (End-of-line) characters are ignored. I confirmed this with a test.
    I can't see any way to check this in the loop so I'll first...
  28. Re: FileIO.TextFieldParser fixed width too long

    Oh! Dang. I looked four a peek method but I didn't see peekchars. Thank you!
  29. [RESOLVED] FileIO.TextFieldParser fixed width too long

    I have a case where source data is fixed-width but due to an error in their generator not handling a negative value correctly. The line width is one character too wide. Since data to the right is...
  30. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Thank you
  31. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    OK, my mistake. I just don't understand how this works. Thanks. I tried to mimic what Paul posted and it didn't work.

    It's a method in the dbTools object in DoWork.
  32. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    I'm messing this up somehow. I just don't understand.
    In my dbTools class I have this function.Public Function BulkUploadSuccess(bwMain As System.ComponentModel.BackgroundWorker,
    ...
  33. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    I'd like to learn how to do this.
    Would you be willing to show my how I would do this in my case?
  34. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Oh cool! Thank you.
  35. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Good point. I'll think about that.
    However the fact that it failed or succeeded means it was attempted. And "bulk upload" is the action.
    Also to me it's part of a sentence. "If (the) bulk upload...
  36. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    That was all educational and about what I understood, more I don't understand the commands to implement it.

    Many of my routines are fail or success values returned. I use this as my error handing...
  37. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Thanks Paul, "Invoke" got me to looking and I see what I failed to copy over from the working project. I was playing with some things and forgot to put somehting back.
    Me.Invoke(New...
  38. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Thanks Paul. Sounds about right, but I don't know how to do that.
    I really need to learn about these someday...
  39. VS 2022 Re: SqlBulkCopy RowsCopied event not updating TextBox

    Sounds like what might be happening.
    I don't know what would be relevant. I have a default main form frmMain with the text box. frmMain also has the sub I showed above to modify the text box....
  40. VS 2022 SqlBulkCopy RowsCopied event not updating TextBox

    I don't understand delegates, but I got some help a while back and was able to make it work. Now I have a new project and I did something to break it.
    I have a Background Worker that has an object...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width