2,245 Posted Topics

Member Avatar for kanuri1

Why not have SQL Server generate the auto increment number for you? Create a table with an identity column: [code=sql] Create Table Tbl ( ID int identity(1000, 1) PRIMARY KEY, NameFirst varchar(50), NameLast varchar(50) ) [/code] Then insert data: [code=sql] Insert Into Tbl (NameFirst, NameLast) Values ('Scott', 'Knake') Select Cast(SCOPE_IDENTITY() …

Member Avatar for sknake
0
105
Member Avatar for Pankaj18

You can use logic like this to indicate the position of invalid emails. You didn't say VB/C# so I assumed C#: [code=c#] private void button3_Click(object sender, EventArgs e) { string input = @"a@b.com, a@c.com, ffff23805789232(*@#(*@#&)(*, a@d.com, e@f.com"; System.Net.Mail.MailAddress[] addrs = GetEmails(input); if (addrs.Length == 0) { //No emails were entered. …

Member Avatar for sknake
0
251
Member Avatar for kadilacgh
Member Avatar for joharasad

Here is a code example what MeSampath suggested: [code] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'Read an image Using conn As New System.Data.SqlClient.SqlConnection("Data Source=apex2006sql;Initial Catalog=Scott;Integrated Security=True;") conn.Open() Using cmd As New SqlClient.SqlCommand("Select Top 1 Name, CreateDate, Picture From Picture", conn) Using dr As SqlClient.SqlDataReader …

Member Avatar for sknake
0
166
Member Avatar for CBLACK10

I don't understand what you are asking. Could you explain your situation a little more?

Member Avatar for sknake
0
110
Member Avatar for terdie

Check your IP address against known lists on the internet: [url]http://www.mxtoolbox.com/blacklists.aspx[/url] [url]http://www.spamhaus.org/sbl/[/url] [url]http://www.blacklistalert.org/[/url] If you have a dynamic IP from your ISP sometimes you will get an ip address that caused abuse by another user and you have to request getting your address removed.

Member Avatar for sknake
0
146
Member Avatar for Egypt Pharaoh

[code] private void frmImage_Load(object sender, EventArgs e) { new Action(CreateStuff).BeginInvoke(null, null); } private void CreateStuff() { DateTime dtStart = System.Diagnostics.Process.GetCurrentProcess().StartTime; while (DateTime.Now.Subtract(dtStart).TotalSeconds < 10) //10s System.Threading.Thread.Sleep(10); TextBox tb = null; this.Invoke(new MethodInvoker( delegate() { tb = new TextBox(); tb.Location = new Point(0, 0); tb.Text = "abc123"; tb.Name = "textbox12345"; this.Controls.Add(tb); …

Member Avatar for sknake
0
112
Member Avatar for immujeeb

Why don't you write an XML serialization method yourself? The [icode]DataTable[/icode] and [icode]DataSet[/icode] xml serializations can add a lot of other stuff to the XML file. You can also create your columns like this: [code] DataTable dtBeer = new DataTable(); dtBeer.TableName = "Beer"; //Very important to set the table name …

Member Avatar for immujeeb
-1
127
Member Avatar for Dmennite

[B]>> is there a way to check if the value in the textboxes match the field in the database so it does not overwrite the field if it has not been changed.[/B] It is very redundant so Microsoft included code generators for DALs (data access layers). You can create a …

Member Avatar for Dmennite
0
180
Member Avatar for The Dude

My results: [quote] You are Superman You are mild-mannered, good, strong and you love to help others. [/quote]

Member Avatar for Ancient Dragon
0
148
Member Avatar for zautashvili

It is and conceptually it is identical to paging. In web apps you want to retrieve rows 0-9, 10-19, 20-29, etc. I normally hate to refer people to google for an answer but there are a lot of ways to go about doing this and you should select the one …

Member Avatar for sknake
0
154
Member Avatar for johndb

The [URL="http://technet.microsoft.com/en-us/library/cc723564.aspx"]PATH[/URL] and [URL="http://technet.microsoft.com/en-us/library/cc723564.aspx"]PATHEXT[/URL] environment settings are used to locate applications that start. So for your example, notepad.exe, there are two conditions that must be met for the program to execute: 1) The program is in the current working directory (cwd) or contained in [icode]%PATH%[/icode] 2) The program extension was …

Member Avatar for sknake
0
243
Member Avatar for nccsbim071

Can you explain what you are really trying to do here? What type of file is this? Most file types don't do you any good unless you have the entire file downloaded, the exceptions being multimedia. However multimedia files are usually compressed for distribution so in this case I don't …

Member Avatar for sknake
0
895
Member Avatar for princesspretear

What do you mean by it wont save data? Does the code throw an exception or does it not error, but you don't see data?

Member Avatar for sknake
0
212
Member Avatar for Egypt Pharaoh

[code] private static Bitmap GetScreenShot(Control ctrl) { Bitmap result = new Bitmap(ctrl.Width, ctrl.Height, PixelFormat.Format32bppArgb); using (Graphics gfx = Graphics.FromImage(result)) { Point pt = ctrl.PointToScreen(new Point(0, 0)); gfx.CopyFromScreen(pt.X, pt.Y, 0, 0, result.Size, CopyPixelOperation.SourceCopy); } return result; } private void button7_Click(object sender, EventArgs e) { Bitmap panelScreenshot = GetScreenShot(panel1); pictureBox1.Image = panelScreenshot; …

Member Avatar for sknake
0
152
Member Avatar for 21KristianN

What version of SQL Server are you running? DTS was available in MSSQL 2000 but replaced with SQL Server Integration Services in MSSQL 2005 and later. You may consider reading up on SSIS. If you are using MSSQL 2000 then you can create a DTS package for the import and …

Member Avatar for 21KristianN
0
95
Member Avatar for Romil797

[QUOTE=avirag;1079349]Well you can try this: [CODE] <html> <Head> <body bgcolor="Green"> <img src="http://www.image path" alt="" /> </body> </head> </html> [/CODE] Hope it helps.......:)[/QUOTE] I want to point out one thing here -- With HTML enriched emails you have to use pure HTML and not the newer XHTML. When I was first …

Member Avatar for sknake
0
383
Member Avatar for nccsbim071

Yeah there is all sorts of ways you just need to wire one up. Why don't you use a C# application to create a WebRequest and hit your PHP page that will begin compressing the file. This also eliminates adding more code paths to your project since you'll be using …

Member Avatar for Medalgod
0
177
Member Avatar for shanboy

You need to clean up the SQL classes you're instantiating as well. They implement [icode]IDisposable[/icode] and should be disposed of: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace daniweb { public partial class frmSqlSearch : Form { public …

Member Avatar for sknake
0
141
Member Avatar for milanese

I would listen to rch1231. There is also another utility called rsync you can get for Windows which has extensive copy/backup options. This [B]may[/B] be possible to do in a batch script but you will need to run down those guys who used to make batch files for as400 mainframes …

Member Avatar for Aia
0
111
Member Avatar for Merovingian

[code] Insert Into DB1..Table(Col1, Col2) Select Col1, Col2 From DB2..Table [/code]

Member Avatar for sknake
0
39
Member Avatar for nertos

If you're updating a GUI then that must take place on the main thread. I think this example is something like you're wanting to do: [code] using System; using System.Collections.Generic; using System.Runtime.Remoting.Messaging; using System.Threading; using System.Windows.Forms; namespace daniweb { public partial class frmDoubleDraw : Form { public frmDoubleDraw() { InitializeComponent(); …

Member Avatar for sknake
0
93
Member Avatar for chi-hawk

By default routers don't forward multicast traffic I believe unless they are told to subscribe via [URL="http://en.wikipedia.org/wiki/Internet_Group_Management_Protocol"]IGMP[/URL]. What type of edge routers are you running on both sides of the connection? You should consider running [URL="http://www.wireshark.org/"]Wireshark[/URL] on the side of the connection listening for data to see if you receive …

Member Avatar for sknake
0
132
Member Avatar for tiwas

With .NET you don't. Go ahead and give your deployment project a shot. It is also helpful because if you compile, say, a .NET 3.5 application and they don't have the framework installed then the application will just crash and you can't even show an error message box saying what …

Member Avatar for sknake
0
79
Member Avatar for blur_guava

Why don't you just create a class in the designer and let the IDE/compiler handle it? I have never modified a project file like you're talking about

Member Avatar for blur_guava
0
237
Member Avatar for mshravs

Have you even [b]tried[/b] to [URL="http://lmgtfy.com/?q=camserver.dll"]google[/URL] that? [url]http://www.codeproject.com/KB/cpp/webcamcsharp.aspx[/url]

Member Avatar for mshravs
-1
66
Member Avatar for minigweek

Extract your embedded resources to a temp directory and point the web browser to the temp dir: [code] private void button3_Click(object sender, EventArgs e) { string tempDir = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString()); System.IO.Directory.CreateDirectory(tempDir); //Extract your resources --- dont forget to delete the files when you are done! } [/code]

Member Avatar for sknake
0
2K
Member Avatar for zachattack05

I will post the code for creating an empty table .. but how is that going to help with your problem? [code] /// <summary> /// Builds a connection string /// </summary> /// <param name="server"></param> /// <param name="database"></param> /// <returns></returns> internal static string BuildSqlNativeConnStr(string server, string database) { return string.Format("Data Source={0};Initial …

Member Avatar for zachattack05
0
2K
Member Avatar for zachattack05

[QUOTE=zachattack05;1070705]Quick question...what if the number of strings is unknown, or is dynamic? Or in a situation like that would it be better to use a database?[/QUOTE] As a general answer to your question I would say no. You can serialize an array or use a generic [icode]List<string>[/icode] and serialize that, …

Member Avatar for drifai
1
864
Member Avatar for sitie_aniem

A local printer is plugged directly in to your PC (usually USB, LPT) while a network printer is available over TCP/IP. You can share local printers, buy a print server and have a true network printer if the unit doesn't come with a NIC, or the newer and more expensive …

Member Avatar for sknake
0
281
Member Avatar for priyankkothari

Post the code for your entire page. Please use code tags when posting code on daniweb: [noparse] [code] ...code here... [/code] [/noparse] Also use the debugger and evaluate [ICODE]IsPostback[/ICODE] and see how many times the code is run.

Member Avatar for sknake
0
102
Member Avatar for mhz42

Have you tried executing the application outside of the debugger? If that fixes it (I doubt it) then shut the visual studio hosting process off for the project. The hosting process tends to screw up more than it helps. As for the JxtaNET.dll you can use RedGate's reflector to decompile …

Member Avatar for mhz42
0
223
Member Avatar for th3learner

You can also take a look at [icode]char.IsNumber()[/icode]: [code] private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsNumber(e.KeyChar)) e.Handled = true; } [/code] There is still a few more problems though -- You can right click on the text box and select "paste" and that will allow pasting letters in …

Member Avatar for sknake
0
456
Member Avatar for any123

That depends a lot on how you're painting the rectangle. Here is a sort-of-generic way to measure given a control. [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmDrawText : Form { public frmDrawText() { …

Member Avatar for sknake
0
81
Member Avatar for rutaba

That industry is in the toilet ... I hope you don't expect to get paid! :P As far as what technology to use that depends on your customers demand and what you want the application to use. Also the datastructure depends on the database you want to use. IE is …

Member Avatar for jen]
0
229
Member Avatar for mps727

Can you upload a sample project? I can't compile the code -- I'm missing references to the controls. You should also use [icode]using()[/icode] blocks to ensure instances of IDisposable are cleaned up when they go out of scope. Also why don't you use the graphics provided in [icode]e.Graphics[/icode]? in the …

Member Avatar for mps727
0
213
Member Avatar for Maulth

That doesn't mean anything. Some routers are configured to respond to traceroute and others are configured to deny it. If the routers were down you would not get any responses past that router. In one of your traceroutes you have 3 hops that do not respond then it starts responding …

Member Avatar for sknake
0
325
Member Avatar for anonymous alias

[QUOTE=VernonDozier;1076399]As to the larger problem, you can only give rep to an individual once a day. If they made the up/down the same way, that might limit the havoc.[/QUOTE] That would effectively make votes the same as rep. I noticed she did put a 15second delay in there for casting …

Member Avatar for diafol
-2
414
Member Avatar for XshulderX

You need to add a reference to the SqlLite assembly in your project. Have you installed the SQLLite software? If so right click on the "References" folder in your solutions explorer and select "Add Reference". Browse to the assembly DLL and add the reference.

Member Avatar for sknake
0
69
Member Avatar for emilio

It works for me except I had to add a call to sleep after [icode]SetForegroundWindow()[/icode]. Also try adding a call to [icode]SendKeys.Flush()[/icode] after you're done sending keystrokes: [code] SetForegroundWindow(wordHandle); System.Threading.Thread.Sleep(100); SendKeys.SendWait("111"); SendKeys.SendWait("*"); SendKeys.SendWait("11"); SendKeys.SendWait("="); SendKeys.Flush(); [/code]

Member Avatar for emilio
0
3K
Member Avatar for agent154

You could use a directory selector dialog to allow overriding of the my documents path. Once a user overrides it then you could save the value in your application's config file so you won't have to deal with the dialog again. You would have automation and portability.

Member Avatar for sknake
0
165
Member Avatar for shachar

Yeah one is the setup.exe and <Name>.msi. The setup.exe is just a wrapper to call the MSI file. Some older versions of windows don't support MSI files for installing so you are given both versions. Just give out the MSI as most people will be able to install it nowdays.

Member Avatar for sknake
0
66
Member Avatar for maxicube

You're probably pissing the FTP server off since you appear to be hammering it with connections. You should re-use an FTP connection to send file after file on the same connection, meaning you should open the connection -- send file 1 -- send file 2 -- send file 3 -- …

Member Avatar for maxicube
0
279
Member Avatar for bharanidharanit

What errors are you getting? What database are you using? Usually encrypting a string results in a longer string than the original input data so you may not have the columns defined wide enough in your database.

Member Avatar for bharanidharanit
0
109
Member Avatar for tuyudi

Please use code tags when posting code on daniweb, and post the RAW sql -- not a huge concatenated string from VB: The problem is that you forgot an `'` in your query on the line for July: SELECT qry_close_month.Item_code, T_ITEM.item_name, Sum(IIf(qry_close_month.Bulan='January',qry_close_month.Stock,0)) AS Jan, Sum(IIf(qry_close_month.Bulan='February',qry_close_month.Stock,0)) AS Feb, Sum(IIf(qry_close_month.Bulan='March',qry_close_month.Stock,0)) AS Mar, …

Member Avatar for sknake
0
173
Member Avatar for fallopiano

[B]>> - so in c# is 'this' the same as 'self' in python? 'self' meaning that the next period and variable/function are part of the class?[/B] Yes. When you're dealing with derived classes "this.<name>" could also point to a member in the base class if you did not override it …

Member Avatar for sknake
1
146
Member Avatar for royshoa

That is a tough one. Run the query both ways and take a look at the execution plan and see what indicators it gives you. You can include the actual and estimated plan using SQL Server Management Studio.

Member Avatar for sknake
0
119
Member Avatar for zachattack05

[B]>> 1) Are "plug-ins" a common thing for applications to support? As in..."copy this .dll (or whatever) to this folder and bam! you get more features!"[/B] That really depends on the type of application. Some applications also offer plugins but only from the software vendors. ie an accounting software package …

Member Avatar for zachattack05
0
133
Member Avatar for johnyjj2

I would use UDP over TCP if you're streaming the data, but not if you're transferring a file. UDP is a stateless method of sending data and does not validate data integrity, which is analagous to how the radio and telephones work. If the packet is lost you will not …

Member Avatar for sknake
0
1K
Member Avatar for Acute

Is using the standard CTRL+C an option? You could flag while you were in the middle of a loop and break out of the loop instead of killing the console application. I think you have to implement a considerable amount of code to start handling intercepts for CTRL+<key> in console …

Member Avatar for sknake
0
564

The End.