2,245 Posted Topics
Re: Is you recordset using an oledb or odbc connection? I think odbc in classic asp has issues with text/ntext data types. | |
Re: Its hard to say since you're referencing variables declared outside the scope of your project but obviously something is null. Which line of code is raising the exception? | |
Re: You want to use the static Regex.Match() if you run this iteration more than once in the lifecycle of the applicaiton. [QUOTE]The Regex class contains several static (or Shared in Visual Basic) methods that allow you to use a regular expression without explicitly creating a Regex object. In the .NET … | |
Re: You should have a .ClearBeforeFill property on your dataAdapter if it was created by the designer. If not you can call dataSet.Clear() before you call .Fill() | |
Re: [code=bash] echo "data to add" >> EmpFile [/code] | |
Re: Another 'rule of thumb' about properties versus methods is that Properties should not throw exceptions for the most part. A calculated value for a property is common (see Control.Right) but if you have to do something that may be unsafe and raise an error then a method may be better | |
Re: Try this: [code=csharp] private static decimal[] GetTestData() { List<decimal> lst = new List<decimal>(); for (int i1 = 0; i1 < 250; i1++) lst.Add(Convert.ToDecimal(i1)); return lst.ToArray(); } private static string PackArray(decimal[] values) { List<string> lst = new List<string>(); foreach (decimal d in values) lst.Add(Convert.ToString(d)); return string.Join(",", lst.ToArray()); } private static decimal[] … | |
Re: Welcome to DaniWeb tdapower! Please post the relevant code for your application on this thread so we can see where the problem is. when you post code be sure to use code tags: [noparse] [code=vb.net] ...code here [/code] [/noparse] | |
Re: [code=csharp] if ((cmb1.Text == "0") && (string.IsNullOrEmpty(txtbx1.Text) || string.IsNullOrEmpty(txtbx2.Text))) { MessageBox.Show("empty"); } [/code] | |
Re: I thought I had value to add to the thread but I made a mistake :) Like it was mentioned above, you need to post the code causing the error. | |
Re: [code=sql] IF OBJECT_ID('TestTable', 'U') IS NOT NULL DROP TABLE TestTable Create Table TestTable ( Col1 varchar(30), Col2 varchar(30) ) Insert Into TestTable (Col1, Col2) Values ('a', 'b') GO IF OBJECT_ID('tempdb..#Temp', 'U') IS NOT NULL DROP TABLE #Temp Create Table #Temp ( Col1 varchar(30), Col2 varchar(30) ) GO --Now we have … | |
Re: which line raises the exception? | |
| |
Re: What have you tried so far? Post the code you have and we can work from there | |
Re: Paste the code of how you are having the service display the message box. I know there are options for services to display messages to the currently logged in profile. I have an idea :) | |
Re: Take a look in the debugger at the full path: [code=csharp] string localImageUrl1 = Server.MapPath(@"Images\" + fileName); string localImageUrl2 = Server.MapPath(fileName); System.Diagnostics.Debugger.Break(); [/code] Compare the two strings and see what the difference is. Also -- What does your directory structure look like where the image is housed? | |
Re: Upload a sample project demonstrating the condition on what you want to change | |
Re: If they blocked the ports then there isn't much you can do about it. Run it on a port like 51392 | |
Re: Danny is right but it creates a repository textbox on the fly and I can't find the event to hook in for this. You could also handle the cell validation event: [code=csharp] 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 … | |
Re: This is more of a VB.NET question than MSSQL, but yes that is the recommended way of connecting to SQL Server. What is the issue? | |
Re: So the *left* coordinate of the label should be fixed and it should *always* grow right? Or only grow right when it can't grow left anymore? | |
Re: Are they configured with a bridged ethernet adapter from your host OS? They should be able to communicate with standard TCP/IP networking. You can firewall egress on the host OS to stop their traffic from leaving the local computer. | |
Re: [code=csharp] //int currentRow = int.Parse(e.RowIndex.ToString()); //Change to int currentRow = e.RowIndex; [/code] For your exception it looks like you're trying to convert a non-numeric string to an integer. Please examine your data. This should help: [code=csharp] int friendsIDInt; string friendsIDString = dataGridView1[0, currentRow].Value.ToString(); if (!(int.TryParse(friendsIDString, out friendsIDInt)); { MessageBox.Show("The following … | |
Re: I'm afraid I don't have much experience with the reporting services but this sounds like you're having issues with the TSQL statements? Can you right click on the table you're trying to insert to in the SQL Server Management Studio, click "Script table as -- Create to -- Clipboard" then … | |
Re: Try this: [code=csharp] private void button3_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); foreach (DataGridViewColumn col in dataGridView1.Columns) { sb.AppendLine(col.Name); } MessageBox.Show("Column Names: " + Environment.NewLine + sb.ToString()); foreach (DataGridViewRow gridRow in dataGridView1.Rows) { if (gridRow.IsNewRow) continue; string nameLast = Convert.ToString(gridRow.Cells["nameLastDataGridViewTextBoxColumn"].Value); int custId = Convert.ToInt32(gridRow.Cells["custNumberDataGridViewTextBoxColumn"].Value); } } [/code] | |
Re: Is it because of the space in the name? Try "[total cost]" and "total_cost" to see if that fixes it. | |
Re: [QUOTE=thewebhostingdi;943202]The settings will be applicable to Admin user only. It will not affect anything to other users of your system.[/QUOTE] thewebhostingdi -- Do you use daniweb to post worthless comments for promoting your site? As far as I can tell all you give is bad advice. The OP indicated that … | |
Re: You will start seeing timeouts and deadlocks. Deadlocks occur from poor database design and timeouts can be the same too, or it can be just too much load. As for what the server can take that depends a lot on the hardware and version(s) of software. The SQL Server Profiler … | |
Re: Welcome to daniweb! You can also check out code project @ [url]www.codeproject.com[/url]. They have a lot of great articles with code samples | |
Re: 1) How are you trying to connect to the SQL Server inside of Visual Studio? You should be using a SQL Native connection 2) You need to create a "SQL Connection Form" in your application that lists the SQL Server and Databases and lets a user select where they want … | |
| |
Re: What size is this project? I win bids for small-mid sized projects all the time because people send out on 11 page proposal with all this technical garble nobody understands. I keep programming, layering, data access, etc out. I wouldn't even mentioned C#, just .NET. However if it is a … | |
Re: Yes, but you need to determine a storage location. If it should apply to all users of an application across the network -- then you should store it in a database. If it applies to an application across the entire machine you should save it in the Machine level configuration … | |
Re: Be careful when you create inherit classes -- your constructor is not formed properly. You should call [icode]: base()[/icode]. Also if you fire the click event like that it will expose the picture box as the sender. Also this adds a new event and doesn't change the existing panels MouseDown … | |
Re: Does the text box get its' text set in the data received event? You should also call .Invoke from the Textbox and not the form since that is the control you are manipulating. [code=csharp] private SerialPort port; public frmInvoke() { InitializeComponent(); } private void frmInvoke_Load(object sender, EventArgs e) { port … | |
Re: What is the error you are receiving? Check your windows firewall and ensure you have bound your default website to your external IP add the host header is a wilcard since you will be referencing it by IP address. | |
Re: Can you post the code of how you are attempting to open the spreadsheet? | |
Re: Are you sure you want to do that? That sounds so 1980ish :) Anyways you could just create a class the represents each table in the database and override the .ToString() method and create a static length string. | |
Re: [QUOTE=serkan sendur;942417]wwf, wcf , wwf ---> wtf[/QUOTE] lol | |
Re: >>i doing a project. I need to send sms or mms to mobile phone from server From a server or an FTP server? FTP Servers don't initiate outbound connections so you might be out of luck on this one. | |
Re: Create a user control that has a question & answer test box. When you load the form you can add 30 of the user controls and populate the questions. | |
Re: You can work with dates directly. [QUOTE=Difou;942178]substract date directly in an expression. Bie[/QUOTE] The integral part of the DateTime value is the number of days since the first day defined for the datatype, and the decimal portion is the time. [code=sql] Declare @dt DateTime Set @dt = GetDate() Select @dt … | |
Re: You should look in to SQL Server Replication Services. You can't very well do this with a stored procedure alone. | |
Re: Create an updater delegate and method to invoke the call on the proper thread: [code=csharp] private void frmInvoke_Load(object sender, EventArgs e) { port = new SerialPort(); port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived); } void port_DataReceived(object sender, SerialDataReceivedEventArgs e) { SetMessageText(port.ReadExisting()); } public delegate void SetText(string s); public void SetMessageText(string s) { if … | |
Re: [QUOTE=kaninelupus;936164]Can you boot up in safe mode? If so, try running a system restore from there and rolling back the updates. Afterward, try adding the available updates one or two at a time - should have less issues, and will allow you to catch if it is a particular update … | |
Re: In addition to the timespan you can also add dates using the DateTime class: [code=csharp] DateTime utcNow = DateTime.UtcNow.AddSeconds(15); [/code] | |
Re: Call recordSet.Fields.Append("name", type) and manually convert the values to the new type | |
Re: Its a little messy but here you go: [code=sql] --Get test data IF OBJECT_ID('tempdb..#Test', 'U') IS NOT NULL DROP TABLE #Test Create Table #Test ( OrderDate DateTime, ExpectedValue varchar(2) ) Insert Into #Test (OrderDate, ExpectedValue) Values (Cast('2009-08-07 09:48:12.793' as DateTime), 'H1') Insert Into #Test (OrderDate, ExpectedValue) Values (Cast('2009-08-07 04:48:12.793' as … | |
Re: Please clean up your queries before you post them to this forum :) The problem seems to be you have this in the wrong location: [code=sql] AND C.date BETWEEN '&session(payp_week1_start)&' AND '&session(pay_end_date)& [/code] That is a condition for the third join in your query and should be a condition for … | |
Re: I think you need to launch a thread in the OnStart() to keep the service alive. When a Service calls the OnStart() it does not report the service as "running" until the main thread finishes -- and it probably has to have another thread to keep it alive. Unlike form … |
The End.