Posts
 
Reputation
Joined
Last Seen
Ranked #522
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
97% Quality Score
Upvotes Received
35
Posts with Upvotes
30
Upvoting Members
26
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
18 Commented Posts
0 Endorsements
Ranked #254
~117.00K People Reached
About Me

Moving from Delphi to C#. Many years in SQL development. When not programming, I ride horses.

Interests
Morgan Horse Shows
Favorite Forums

291 Posted Topics

Member Avatar for JerryShaw

Well I guess it is my turn to ask a question, since most of the time I spend answering questions on DaniWeb. The Problem: DataViewGrid throws a "System.ArgumentException parameter is not valid..." when the dataset contains an SQL 2005 TimeStamp type column. The error occurs in System.Drawing.FromStream... da da da …

Member Avatar for work.caglar
0
1K
Member Avatar for jitupatil_2007

There are a number of ways to do this. Using directing insert statement is one, another is using a stored procedure, calling as ssis package is another. The easiest is probably the insert statement. Simple get you SqlConnection, then use an SqlCommand. use the string.Format method to parse the data …

Member Avatar for AITM_1
0
2K
Member Avatar for flash121
Member Avatar for Wiizl

I sugest you take a different tact. What I typically do for managing thread messages is I create a simple EventArgs class to hold the message information, a Delegate to represent the main thread method that will use the information, and an eventhandler in the main thread that can be …

Member Avatar for Matthew.diggide.speakman
0
7K
Member Avatar for jainendra.shah

Let me re-state your question to see if I understand you correctly. You have two forms. First form has a check list box, and the second form has a listbox. When the user checks an item in the check list box, you want that item to be added to the …

Member Avatar for Emmanuel Jay
0
1K
Member Avatar for aa361

As danielernesto said, store it to a column type that supports byte arrays such as Image or VarBinary(max). // Jerry

Member Avatar for nargis.hemani
0
4K
Member Avatar for kobi
Member Avatar for JirkaJirka
0
213
Member Avatar for IT_Techno
Member Avatar for Momerath
0
554
Member Avatar for 1qaz2wsx7

#3, you can't stop it from sending the a minimize command (without some Windows API calls), however if you want it to do more things before it minimizes, you can use the Deactivated Event handler or the SizeChanged event ([URL]http://www.thescripts.com/forum/thread275452.html[/URL]). If you want to stop the minimize action, then you …

Member Avatar for JerryShaw
0
2K
Member Avatar for ryudo1987

Doesn't close because the while statement runs out of reads, and drops into the dr & lgnconnection close... It does not make sense to have both the true and false of a conditional result in the same statement "Close()". Why compare at all if the result is always going to …

Member Avatar for prathamesh3090
0
1K
Member Avatar for NguyenThai

Instead of using a private bool variable, use a private variable for Form2, then you have some options... [code] public partial class Form1 : Form { private Form2 _form2 = null; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { button1.Enabled = false; _form2 = new Form2(); …

Member Avatar for adetolah
0
158
Member Avatar for Exelio

Are you speaking of the Header cells, or a data cell ? I havn't tried it on tried it on the header, however I am pretty sure it can be done. If you are speaking of data cells, you can use the CellFormatting([COLOR=#0000ff]object[/COLOR] sender, [COLOR=#008080]DataGridViewCellFormattingEventArgs[/COLOR] e) CellFormatting event to set …

Member Avatar for sachinmuley
0
346
Member Avatar for Prodian

Writing an ini parcer is pretty straight forward. I have attached a class library that I use, and included the source code for you to check out.

Member Avatar for duffmanleesin
0
170
Member Avatar for Nareshp_123

Yes you can do this. I have a service that does this type of work for archiving files. Remember that a mapped drive is in the context of the currently logged on user. A Windows service runs in its own context. So, your mapped drive may not be visible to …

Member Avatar for JerryShaw
0
2K
Member Avatar for fkhaeer

As BlackSun explained, you will need to manage it yourself using the image Graphics. It is a bit more complicated than the example above, but should move you into the right direction. The image onPaint event will have to remember that you have an active selection (the rectangle, and its …

Member Avatar for JerryShaw
1
192
Member Avatar for AniWeb

What Ramy is saying is that you do not specify a File name, but rather a ConnectionString. [code] SqlConnection conn = new SqlConnection("Data Source=Servername;Initial Catalog=Marketing;Integrated Security=SSPI"); conn.Open(); [/code]

Member Avatar for lianpiau
-2
1K
Member Avatar for JerryShaw

I have the multiple level path of a filename, and I want to pull out just the immediate parent directory name of this file. Example: Filename = "c:\temp\extra\test\myfile.txt" How can I get "test" from this string ? Thanks in advance Jerry

Member Avatar for Derek W
0
487
Member Avatar for er.sajal

"Give same Code ??" Do you mean giving them all the same event handler ? then let the event handler determine the button that was used ?

Member Avatar for S.Santosh
-1
3K
Member Avatar for charlie81

Another hint for you, Your assignment says to compute the rate at 7.5 for the first 40 hours, and 11.25 for each additional hour. Your condition is only checking for if the hours equal exactly 40 hours then use 7.50, else use 11.25. So with your condition, if worked any …

Member Avatar for derea.tadea
0
1K
Member Avatar for it2051229

It all depends on when you are letting the user delete the file. Even through the dialog is closed, does not mean it has been disposed by garbage collection. To insure you no longer have the picture file handle open, before closing the dialog (or in the FormClosed event handler), …

Member Avatar for tanisha123
0
311
Member Avatar for Ramon78

Instead of mangling the SQL statement (embedding CRLF), just iterate through the rows and columns, and populate the text box. Here is a simple example: [CODE] private void toolStripButton1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Data Source=SHAWHP;Initial Catalog=SalonWiz;Integrated Security=True"); conn.Open(); DataSet ds = new DataSet(); SqlDataAdapter adapter = …

Member Avatar for jas@yahoo.co.in
0
1K
Member Avatar for ironbill

Here is a snip of code from my Login screen. It has the usual Server Name, User name and Password texboxes, and a Login and Cancel button. Mine is hardcoded for a database named SAFEnet. This is using the SQLclient (SQL2005). If you are using another type DBMS, let me …

Member Avatar for kumar169
0
240
Member Avatar for zachattack05

You will be wrapping the code that creates the database anyway, so just supply good error messaging and go with the assumption. IOW, why add additional code when SQL is going to do those checks for you anyway regardless of your pre-checks. JMO

Member Avatar for zachattack05
0
96
Member Avatar for d87c

Why so much code? Try this to get started [code] static void Main(string[] args) { string[] meals = System.IO.File.ReadAllLines("meals.csv"); foreach (string meal in meals) Console.WriteLine(meal); Console.ReadKey(); } [/code]

Member Avatar for JerryShaw
0
115
Member Avatar for erfanjan

Look at [URL]http://msdn2.microsoft.com/en-us/library/system.windows.forms.keypresseventargs.keychar.aspx[/URL] then after e.Handled = true; set focus to the next control / textbox.

Member Avatar for Geekitygeek
0
140
Member Avatar for Ved_TheOne

Are you aware that the Jet engine is very picky about the dBase file version. This is why I prefer to use the ODBC classes instead of Ole. I had a similar problem using your code, and after switching it out to use ODBC, everything worked fine, and even a …

Member Avatar for ckhong
0
1K
Member Avatar for majestic0110

First, your ASP is the one connecting to the database using the credendials of the web site setup. (Windows authentication mode). You are to validating the information from the login screen against the database. Just keep in mind that SQL sees the web service as the one logged in not …

Member Avatar for khusiaaaan
0
244
Member Avatar for baladeveloper

***what is MyGrid referring to in this code ^^^ ???*** [U]Answer: A DataGridView[/U] ***hi ... how to create the stored procedure?, and how to call the stored procedure in c# ?.... *** [U]Answer: Creating a stored procedure is done at the SQL Server using the tools provided by the database …

Member Avatar for Jinnybat
0
99
Member Avatar for olibara

[code] ************************************************************************************************** private void ShowForm(DataTable dtDagChauff) { if (FrmZTour == null ) { FrmZTour = new FrmDgvZoomTour(); FrmZTour.SelectTour += new FrmDgvZoomTour.SelectTourHandler(DgvTourSelected); FrmZTour.FormClosed += new FormClosedEventHandler(FrmZTour_FormClosed); FrmZTour.Show(this); } FrmZTour.FillDgv(dtDagChauff); } private void FrmZTour_FormClosed(object sender, FormClosedEventArgs e) { FrmZTour.Dispose(); FrmZTour = null; } [/code]

Member Avatar for RicardoE
0
2K
Member Avatar for MillStrike

What you need is a place in your MyProgram.cs class to store the command line arguments received in the constructor (Main). Something like public string SelectedFile; In the Main constructor, do this: [code] public static void Main(string[] args) { string SelectedFile; if (args.Length > 0) { SelectedFile = Convert.ToString(args[0]); MessageBox.Show(SelectedFile); …

Member Avatar for PierlucSS
0
526
Member Avatar for lorentz

There is a variety of ways to do this. I will show you the one I use most often. It all boils down to variable scoping. Form2 (child) needs to be able to see Form1(parent). There are two properties in a Form (Parent and ParentForm), however you can not rely …

Member Avatar for bbman
0
2K
Member Avatar for t_yalthis

I tried them out in 2008, and the directory browser's path does not react correctly. You can add some text boxes to your form that are populated with the new path from this component as you select or even double click around on the dir component... It fails 90% of …

Member Avatar for rhizome
0
870
Member Avatar for sid78669

Take a look at the DateTimeOffset struct. Also the TimeZone class You should be able to use those and then use the DateTime AddHours method to get the new date you are looking for. //Jerry

Member Avatar for tristian2
0
115
Member Avatar for Dimansu

I not sure how you can do it from within your user control, but you can experiment around using the tabcontrol's selecting event handler. Have the save button set the _saved var. [code] public partial class Form1 : Form { private bool _saved = false; public Form1() { InitializeComponent(); } …

Member Avatar for Geekitygeek
0
120
Member Avatar for mastermosley

You may have stumbled upon a known bug within the grid's internal binding logic. But, before I say that for sure, maybe you should post some code that shows your symptom, and we will see. I assume you have a binding source for the grid ?

Member Avatar for JerryShaw
0
109
Member Avatar for samudebr

Here is a simplified way of doing it. Typically, If using a database, I would avoid using the category class all together but that is not what you were asking for. Anyway, All this form has is a TreeView component and an untyped dataset. The onLoad takes off and loads …

Member Avatar for yaninea
1
2K
Member Avatar for ghanathe
Member Avatar for carey_amanda

Just a thought, but you could use the PictureBox control and make it look however you want. You can swap the image out based on Mouse Enter / Leave, and Click events. That gives you total control of what the user sees. Jerry

Member Avatar for ddanbe
0
107
Member Avatar for asenteni

Setting the Enable property of the grid will prevent the user from moving to any subsquent rows. You may have to manually prevent them from selecting that row by trapping the row in the Select event. Then setting the CurrentCell to the next selectable row. This could get messy because …

Member Avatar for asenteni
0
16K
Member Avatar for ananthu

[QUOTE=ananthu;1107751]i need to read contents of a file(of any format) into a char array, how can i do this[/QUOTE] [code] FileInfo fz = new FileInfo(tempFile); FileStream fzs = fz.Open(FileMode.Open, FileAccess.Read, FileShare.Read); byte[] data = new byte[fz.Length]; fzs.Position = 0; fzs.Read(data, 0, Convert.ToInt32(fz.Length)); string strData = Encoding.UTF8.GetString(data); char[] ch = strData.ToCharArray(); …

Member Avatar for JerryShaw
-1
451
Member Avatar for blacksymmetry

adatapost gave you exactly what I would have done. But if you really want to know what to put in that space you have tagged as "WHAT TYPE HERE?" [code] // Display items in the ListView control foreach (DataRow row in dtable.Rows) { //WHAT TYPE HERE? listViewUsers.Items.Add( new ListViewItem(new string[]{ …

Member Avatar for JerryShaw
0
2K
Member Avatar for love_dude1984
Member Avatar for IT_Techno

The SQL Column type you are looking for is either Text or nText. This is a blob field that allows any content you want. Inorder to populate or download from this type of field, use the byte[] array and stream classes. The are ample examples on DaniWeb, CodeProject, and Google …

Member Avatar for eURe
0
2K
Member Avatar for fllee

Well, is this RFID reader transmitting over sockets ? Most RFID readers are serial (Com) or USB devices. When incorporated into a hand-held or POS unit the information surrounding the RFID is usually wrapped along with other information as to the location (register, etc). So your question must be expanded …

Member Avatar for jagadeeshwaran
0
288
Member Avatar for Diamonddrake

If the receivers of the event absolutely must have the information back into thier own thread (like a Windows App sometimes does) then you would handle the invoke for arguments in those receiving threads. Move your delegate out into the name space so that receivers outside of this class can …

Member Avatar for Diamonddrake
0
157
Member Avatar for jonnytabpni

When you scrub off all the fluffy help methods like WriteLn etc, you see that all communications through the comport are actually in byte[] format. Your BMP can be placed into a byte array, and sent to the comport.

Member Avatar for sknake
0
862
Member Avatar for ddanbe

CheckListBox is subclassed from ListBox. The SelectionMode is valid in the ListBox control, but only None and Single in the CheckListBox. It is not a true error! But, the programmer should have overridden the property and used a subset, or just a bool to allow selection or not. Multi select …

Member Avatar for chundachovis
0
413
Member Avatar for bhavna_816

Maybe setting the first enum as an Error so when they do not give a value then you can tell they didn't supply a value.

Member Avatar for sknake
0
140
Member Avatar for Rezant

I changed your code so that you can actually click on the other buttons. [code] public partial class Form1 : Form { private int controlnum = 0; public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Button homebtn = new Button(); this.panel1.Controls.Add(homebtn); homebtn.Text = "New Button" + …

Member Avatar for Rezant
0
156
Member Avatar for IT_Techno

The End.