Search:
Type: Posts; User: cory_jackson
Search:
Search took 0.84 seconds.
-
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.
-
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...
-
I tried adding the parameter with the @ as well.
-
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...
-
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...
-
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...
-
Disregard. I discovered it needs to be checked.
-
Update. In a test program I got it to bind to the setting, but it displays the current day instead of the value.
-
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...
-
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....
-
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...
-
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.
-
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...
-
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,...
-
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...
-
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.
-
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. ...
-
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.
-
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....
-
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...
-
I want to create a header for an output file that will change if the name changes in the object.
-
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...
-
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...
-
Interesting side note is that drag-and-drop doesn't work for me unless it's running as an admin.
-
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...
-
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...
-
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...
-
Oh! Dang. I looked four a peek method but I didn't see peekchars. Thank you!
-
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...
-
-
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.
-
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,
...
-
I'd like to learn how to do this.
Would you be willing to show my how I would do this in my case?
-
-
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...
-
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...
-
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...
-
Thanks Paul. Sounds about right, but I don't know how to do that.
I really need to learn about these someday...
-
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....
-
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...
|
Click Here to Expand Forum to Full Width
|