2,245 Posted Topics

Member Avatar for xcarbon

Also take a look at [icode]System.Diagnostics[/icode], specifically the [URL="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx"]Process[/URL] class.

Member Avatar for sknake
0
46
Member Avatar for amish123

Please use code tags when posting code/config files on daniweb: What are the permissions on the .htpasswd file? `ls -al /var/.htpasswd` Do you see any error messages in `/var/log/apache2/`? Also the password hashes for htpasswd are weak, so you should change the password since you posted it up here. I …

Member Avatar for sknake
0
184
Member Avatar for Venom Rush

You may have outbound FTP filtered. type [icode]iptables-save[/icode] as root on the command prompt and paste the data back here. Also are the two machines you tested on the same LAN? IE 10.1.1.1 = router 10.1.1.2 = broken machine 10.1.1.3 = working machine And you have confirmed they are using …

Member Avatar for landonmkelsey
0
362
Member Avatar for milenio

[code] --Get a test environment set up IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table Create Table #Table ( ID int PRIMARY KEY, [Server] varchar(10), [Target] varchar(10), [Action] varchar(10) ) Insert Into #Table (ID, [Server], [Target], [Action]) Values (1, 'a', 'b', 'attempt') Insert Into #Table (ID) Values (2) Insert …

Member Avatar for sknake
0
402
Member Avatar for hitro456

Do something like this: [code] Select Invoice.LocNumber, (Cast(Floor(Cast(OrderDate as float)) as datetime) - DatePart(day, OrderDate) + 1) As YrMo, Sum(InvDetail.RptAmt) As Sales From Invoice Inner Join InvDetail On (Invoice.InvNumber = InvDetail.InvNumber) Group By Invoice.LocNumber, (Cast(Floor(Cast(OrderDate as float)) as datetime) - DatePart(day, OrderDate) + 1) Order By Invoice.LocNumber, YrMo [/code] This …

Member Avatar for sknake
0
136
Member Avatar for Celt.Max

[B]>>Have you tried a HAVING clause instead of a WHERE clause? I don't really understand the difference, but sometimes HAVING works when a WHERE doesn't[/B] [icode]HAVING[/icode] is used on aggregate comparisons while [icode]WHERE[/icode] is used for row comparisons. Regarding the original poster's query: [code] SELECT TS.col1, TS.col2, count(*) AS Number …

Member Avatar for sknake
0
132
Member Avatar for ace_almario

I had that problem when I upgraded an ASP.NET project from an older version of visual studio and it created a backup directory. Even though I wasn't attempting to browse files in the backup directly it made IIS blow up because the old config file was accessible inside of the …

Member Avatar for sknake
0
97
Member Avatar for ithelp

Same has been happening here for a little while. I click the "Join Us!" link then it lets you sign up for a new account or login without the javascript changing around the page.

Member Avatar for ithelp
0
48
Member Avatar for yo 111

Buy a new router and hope it fixes the problem. Get a WRT54G. There are things you could do for diagnostics but it takes a long time and in my opinion isn't it. I would rather spend $50 and get on with things :)

Member Avatar for jodysmith
0
141
Member Avatar for WillC9999

Visual Studio has to be getting the source from somewhere. You don't get the source code in a debug or release build (yes you can decompile it, but the IDE doesn't). That being said it depends where the IDE is pointed to.

Member Avatar for sknake
0
107
Member Avatar for Rayshiro

On line 14 (from the code in your post) add: [code] File.Copy(Filelocation, @"C:\path\to\new\image.jpg"); [/code]

Member Avatar for sknake
0
195
Member Avatar for ithelp

[B]>> Is this exceptional or every IT companies in US are screwing it's employee like this ?[/B] I don't know that I would go so far as to say they're "screwing" employees. I like to start work ~2am and be out the door by noon so I can attend school. …

Member Avatar for Sodabread
0
130
Member Avatar for mshravs

You need to use parameterized SQL. This question was asked in other threads: [url]http://www.daniweb.com/forums/thread214619.html[/url] [url]http://www.daniweb.com/forums/thread209172.html[/url] I believe those are both C# posts but the VB.NET code would look like: [code=vb.net] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Insert an image Using conn As New System.Data.SqlClient.SqlConnection("Data …

Member Avatar for pauldani
0
72
Member Avatar for sknake

[B]Hello daniweb![/B] I figured I would go ahead and introduced myself now. I have been test driving the site to make sure I wanted to stay before I introduced myself -- its not that I forgot. After being a member for a few months I have decided to stay. I …

Member Avatar for redesignunit
0
175
Member Avatar for vivek4020

Using the KeyDown event of the text box for capturing Enter isn't always safe. If the form has a [icode]DefaultButton[/icode] set then the button will receive the Enter key press, and the textbox event will never fire. What you can do is override [icode]ProcessCmdKey()[/icode]: [code] private void frmTestKeyDown_Load(object sender, EventArgs …

Member Avatar for sknake
0
2K
Member Avatar for ejazmusavi

You shouldn't hard code filenames like that. Have a "Settings" form where the user can invoke an OpenFileDialog() and select the database file. Store the FileName/FullName property to a string value in your application configuration file.

Member Avatar for sknake
0
347
Member Avatar for Camzie

[B]>>Iam new to C# and I need help with creating a dynamic web form using C#.[/B] Your post was for a [B]windows[/B] form, not a [B]web[/B] form. And as avirag asked -- what problems are you having?

Member Avatar for sknake
0
141
Member Avatar for samuel_1991

[code] IF OBJECT_ID('tempdb..#GST', 'U') IS NOT NULL DROP TABLE #GST CREATE TABLE #GST ( EffectiveDate datetime NOT NULL, TaxRate float NOT NULL, CONSTRAINT PK_GST PRIMARY KEY NONCLUSTERED (EffectiveDate) ) GO Insert Into #GST (EffectiveDate, TaxRate) Values (Cast('2004-01-01' as datetime), 5.0) Insert Into #GST (EffectiveDate, TaxRate) Values (Cast('2007-07-01' as datetime), 7.0) …

Member Avatar for samuel_1991
0
671
Member Avatar for kobi

ZIP and upload your project by clicking "Go Advanced" then "Manage Attachments". There are a number of things that could be going wrong here.

Member Avatar for sknake
0
89
Member Avatar for sarasara

When you execute the script write out a PID file. Cron the script to run every 30 minutes and kill itself. You should be able to modify this code to suit your needs: [code=php] class pid { protected $filename; public $already_running = false; function __construct($directory) { $this->filename = $directory . …

Member Avatar for sknake
0
141
Member Avatar for farooq82

Are those code classes in the same assembly? It seems the second class can't find a definition for the first class. Also this is a bad idea: [code] public int ExecuteNonQuerywithMultipleTrans(SqlTransaction sqlTrans, string storedProcedure, SqlParameter[] param) { int returnResult = 0; try { returnResult = SqlHelper.ExecuteNonQuery(sqlTrans, CommandType.StoredProcedure, storedProcedure, param); return …

Member Avatar for farooq82
0
258
Member Avatar for carey_amanda

Yes. In your AssemblyInfo.cs add this: [code] [assembly:RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)] [/code] Then to catch the exception: [code] private void button3_Click(object sender, EventArgs e) { try { //c++ call } catch (System.Runtime.CompilerServices.RuntimeWrappedException ex) { MessageBox.Show(ex.Message); } } [/code]

Member Avatar for jonsca
0
827
Member Avatar for 21KristianN

This is a bad idea. You should not create the record if you intend to delete or have a "quotes" table for storing data before it becomes a live invoice. If you create invoice #5 and then add a payment to invoice #5, then delete invoice #5 and recreate it, …

Member Avatar for 21KristianN
0
368
Member Avatar for nschessnerd

You will want to do all traffic throttling in front of the network or machine. So if you want to throttle you webserver then use the router in front of it. What type of router do you have?

Member Avatar for murthis
0
105
Member Avatar for snarb

[code] Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click Const input As String = "John said 687" Dim words() As String = input.Split(New [Char]() {" "c}, System.StringSplitOptions.None) Dim lastWord As String = words(words.Length - 1) MessageBox.Show(lastWord) End Sub [/code]

Member Avatar for tede_saputra
0
141
Member Avatar for Nfurman

You also need to set "Integrated Security=False;" when using a username/password connection string. Here are example connection string builders: [code] public static string BuildSqlNativeConnStr(string server, string database) { return string.Format("Data Source={0};Initial Catalog={1};Integrated Security=True;", server, database); } public static string BuildSqlNativeConnStr(string server, string database, string username, string password) { return string.Format("Data …

Member Avatar for Nfurman
0
197
Member Avatar for rfrei

Well you should probably use the thread pool and stay away from creating threads with the [icode]Thread[/icode] class and the background worker. Unfortunately I primarily do C# development and could whip this up a lot faster but its taken me 30 minutes to find all the VB.NET equivelants for this …

Member Avatar for rfrei
0
236
Member Avatar for chathuD

How do you determine the date of the item? The lasDateOf column? I have answered a similar thread about finding records regarding a payment date: [url]http://www.daniweb.com/forums/thread222265.html[/url] Here is an example of selecting all invoices older than 90 days: [code=sql] Select * From Invoice Where OrderDate <= Cast(Floor(Cast(GetDate()-90 as float)) as …

Member Avatar for chathuD
0
87
Member Avatar for gianrocks

What problems are you having are right now? Post your code and issue symptoms. There are a lot of things that could go wrong with an sql connection.

Member Avatar for gianrocks
0
196
Member Avatar for capiono

No, why would there be? Pages are destroyed in ASP.NET applications after the server renders the page. Object states are stored in the viewstate so on a postback the page can be recreated. Now with windows forms the objects are never destroyed until you destroy them. What do you need …

Member Avatar for capiono
0
69
Member Avatar for aruntuneson

Use [URL="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx"]System.IO.Ports.SerialPort[/URL]. You will find sample code for using [icode]SerialPort[/icode] in the link provided

Member Avatar for aruntuneson
0
101
Member Avatar for Geekitygeek

You can add a rowfilter to the default view of the [icode]DataTable[/icode]: [code] gridTable.DefaultView.RowFilter = "CompanyName < 'I'"; [/code]

Member Avatar for Geekitygeek
2
148
Member Avatar for niro_fernando

[QUOTE=Ionelul;1091684]if you use LinqToSql, there is an easier way to do the insert. Check the following link for a good tutorial: [url]http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx[/url] Ionut[/QUOTE] I have seen you recommend LINQ to SQL a number of times but not every query-related question is best solved with LINQ. Also I don't know that …

Member Avatar for pauldani
0
142
Member Avatar for papanyquiL

What does [icode]txtPath.Text[/icode] evaluate to at run time? If you're running as a non-admin and attempt to save to another user's profile path, for example, it will give you that error.

Member Avatar for penglund
0
132
Member Avatar for tqmd1

The problem here is that you don't have a picture in the database for that particular row, you have a null value in the database instead. You need to check for a null value before attempting to load the image: [code] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As …

Member Avatar for gianrocks
0
538
Member Avatar for wasyazwan

How is that data structured? Are those numbers always guaranteed to be in the exact same position? If so you could read the middle of the string. Or will the number always start N positions after the N'th decimal number?

Member Avatar for jainmukesh
0
191
Member Avatar for rotemblu

Change the font/locale you're using. Take a look at: [URL="http://msdn.microsoft.com/en-us/library/dc6bb2eh(VS.71).aspx"]Arabic or Hebrew Text in Object Names[/URL] While it isn't directly answering the question you asked it is does explain multilingual support

Member Avatar for kvprajapati
0
133
Member Avatar for dilake

[B]>>But I just want to know why the "not so correct" approach is not working....[/B] Danny already gave you the answer. The best practices for .NET development is to not expose fields publicly, only properties. Allowing you to bind to public properties (with get/set) and data sources helps enforce those …

Member Avatar for dilake
0
124
Member Avatar for appleglaze28

There are a few solutions. If you know you will only need to ever concat up to, say, 6 values then you could hardcode a solution: [code] IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table Create Table #Table ( Column1 varchar(4), Column2 varchar(4) ) Insert Into #Table (Column1, Column2) …

Member Avatar for appleglaze28
0
121
Member Avatar for JayOne

Familiarize yourself with the [URL="http://msdn.microsoft.com/en-us/library/system.threading.interlocked.aspx"]System.Threading.Interlock[/URL] and [URL="http://msdn.microsoft.com/en-us/library/system.threading.monitor.aspx"]System.Threading.Monitor[/URL] namespaces for threadsafe best practices. Here is a stub class for a mail checker. You pretty much just need to complete the [icode]CheckMail()[/icode] method for downloading the messages. Depending on the behavior you want the class is plumbed to fire events either asynchronously …

Member Avatar for sknake
0
177
Member Avatar for JayOne
Member Avatar for capiono

The where condition of your query is wrong. Use: [icode]Where plan_id = [COLOR="Red"][B]@plan_id[/B][/COLOR][/icode] And: [icode]cmd.Parameters.Add("@plan_id", SqlDbType.Int, value);[/icode]

Member Avatar for sknake
1
93
Member Avatar for Lolalola

As far as I know you have to iterate all processes and call [icode].GetOwner()[/icode] in WMI. This is a very slow way to iterate process. see this post: [url]http://www.daniweb.com/forums/thread249799.html[/url] See this article: [url]http://www.codeproject.com/KB/cs/processownersid.aspx[/url]

Member Avatar for sanch01r
0
648
Member Avatar for quansah

Usually with that kind of internet access when you connect you're put on an internal network. When you're connected to that network the provider will resolve any hostname and respond to all traffic and redirect browser requests to their payment site. After you pay and authenticate they put you on …

Member Avatar for sknake
0
243
Member Avatar for shreyas2785

That depends on where you're trying to capture the change. You can create a trigger for update/insert/delete to compare before and after values of a transaction. Are you trying to do this at the application level to show modifications or at the database level for audit trails?

Member Avatar for shreyas2785
0
135
Member Avatar for Progr4mmer
Member Avatar for koleraba

Can you upload a sample project demonstrating the issue? I spend a considerable amount of time implementing the same feature with .NET Remoting altough remoting is less robust than WCF. Also what lines blocks for the timeout period? Looking at this code: [code] public void NotifyClient(string message) { ReceiveDelegate receiver …

Member Avatar for yahawili
0
548
Member Avatar for Mitja Bonca

[icode]float[/icode] is not a precise data type. You should probably be using the [icode]money[/icode] datatype in SQL server to store currency values. Take a look at SQL BOL for float: [quote] Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values …

Member Avatar for sknake
0
119
Member Avatar for wasyazwan

Can you upload a sample file with at least 5 records of data and what your desired output would be?

Member Avatar for wasyazwan
0
407
Member Avatar for jsnowden2008

What are you trying to do? Looking at this code I would say this is a bad idea: [code] localMachineInfo = Dns.Resolve(string.Empty); localEndPoint = new IPEndPoint(localMachineInfo.AddressList[0], _port); [/code] You have multiple local addresses on any given machine. Typically you have a LAN ip address of 192.168.x or 10.x.x.x and you …

Member Avatar for jsnowden2008
0
188

The End.