Nirajk's Q&A profile
Visual C++ error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]'
When I try to compile the programe in VC7, I got some errors mensioned below, how to resolve them, suggest me. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(34) : error C2665: 'operator new' : none of the 5 overloads can convert parameter 1 from type 'const char [71]' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\new.h(100): could be 'void *operator new(size_t,const std::nothrow_t &) throw()' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\new.h(108): or 'void *operator new(size_t,void *)' while trying to match the argument list '(const char [71], int)' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xmemory(137) : see reference to function te ...Show All
SQL Server MOVING SSIS PACKAGES FROM ONE PATH TO ANOTHER ONE
hi, does anyone know how can i move a group of ssis packages from the original path into another one in the same server from ssis services just like we do it with the windows explorer thanks for your help!!!!!!!!!! thanks it works fine, just for the record, there is another option i've found. using the 'dtutil' tool there it is an example of it: dtutil /MOVE SQL;destPackage /SQL srcPackage /SOURCEUSER srcUserName /SOURCEPASSWORD $Hj45jhd@X /DESTUSER destUserName /DESTPASSWORD !38dsFH@v ...Show All
Visual Studio Express Editions code for title bar X
Hi everyone, I have a simple question, the "X" or the close icon in the top right of the title bar, can you write additional code for this What I'm looking at is putting a messagebox onto its click event, like "Are you sure you want to close this application " and then have the Yes/No option. I know all about the messagebox part but I can't seem to figure out where to look for the forms "X" code. Any pointers greatly received. Scott Hi jrboddie, Thanks for the post, I have also found this code on MSDN, which I have tried, but I still can't get it to work private void Form1_FormClosing( Object sender, FormClosingEventArgs e) { System.Text. StringBuilder messageBoxCS = ...Show All
.NET Development Problem Enumerating Sql Server Using System.Data.Common namespace
Below is the code that I'm trying to use to enumerate SQL Servers on a local network. It seems to work fine for getting the host name and the instance name for SQL 2000 and 2005 but with SQL Express it only returns the host name and no other information. Can someone help me with the code DbProviderFactory dbFactory = DbProviderFactories .GetFactory( "System.Data.SqlClient" ); if (dbFactory.CanCreateDataSourceEnumerator) { DbDataSourceEnumerator serverEnumerator = dbFactory.CreateDataSourceEnumerator(); if (serverEnumerator != null ) { System.Data. DataTable dt = serverEnumerator.GetDataSources(); string [] serverNames = new string [dt.Rows.Count]; for ( int i = 0; i & ...Show All
Visual Studio Express Editions Plot real time graph using data read from serial port
I read some data from serial port and i store it with buffer.Add(final). I later would like to take the data from buffer and add it to another new list which is yvalues, data inside yvalues are the what that would be used to plot the real time graph (plot one point every second), yvalues.add (buffer) certainly not going to work..What is the right way of solving this problem Private buffer As New List(Of Integer ) Private yValues As New List(Of Integer ) 'event handler for data_received Private Sub OnDataReceived( ByVal sender As Object , _ ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _ Handles SerialPort1.DataReceived Try TextBox1.Invoke( New myDelegate( AddressOf UpdateTextBo ...Show All
.NET Development Database update works as console app, fails as service
I wrote a console app that has a filewatcher, which takes an .xml document, extracts the data and updates my sql server 2005 DB. It works perfectly as a console app. I tried making it into a service, and it fails upon attempting a connection to SQL server giving me the following error: Login failed for user... I am using the same connection string for both programs. Is there anything special I have to do to let an NT Service connect to SQL Server There is a lot of code, so if you need to see it, let me know what you would like to view.. thanks. It is probably an authentication problem related to the account under which the service was running. When the application runs as a console app the Windows ac ...Show All
SQL Server Connection strings and SQL Express 2005
Hello, I am working on porting a Windows Forms VB.net VS 2003 app with a SQL 2000 backend - to using VS 2005 with SQL Express 2005. I cannot seem to figure out how to set my connection string to work in the new environment. I have already recreated my database in SQL Express 2005 and ported the VS project to VS 2005. The old string was (in my app.config file): <add key="ConnectionString" value="workstation id=MAIN1;packet size=4096;user id=sa;data source=MAIN1;persist security info=True;initial catalog=Dbname;password=####" /> Any ideas Thanks, Sam Which error do you get SQL Server Express is disabled for remote connection by default, you might check the S ...Show All
Visual Studio Workround for Subreport within a subreport??
I have a main report, whith details of a "work order". Within this report is a subreport, and this details all revisions for that work order. This is a requirement. I've been asked by the users to create a summary report for each of them, and from there allow them to expand into the main report. Doing so obviously then gets rid of my revisions subreport. I've read into using hyperlinks but upon trying this I get the same problem. Is there a way to get around this successfully Will this be an implementation into a later version of CR for .NET (is this a limitation to CR.NET, or is it an issue in all CR products ) Any help would be greatly appriciated. Kind Regards, Luke Actually, it's doable. ...Show All
.NET Development socket.connected issue
i cant understand the following situation: i send data from a client to a server.. using the following code.. try { Object objData = richTextTxMessage.Text; Object xyData = xco.ToString("000") + "%" + yco.ToString("000") + "%"; byte[] byData = System.Text.Encoding.UTF8.GetBytes(objData.ToString()); byte[] xybyData = System.Text.Encoding.UTF8.GetBytes(xyData.ToString()); if (m_clientDataSocket != null) { m_clientDataSocket.Send(xybyData, 8, SocketFlags.None); } } catch (SocketException se) { MessageBox.Show(se.Message); } where xco and yco are integers... then i receive it on the server us ...Show All
Visual C# video buffer
Hi.. im developping a client-server application in which i stream video.. i take 5 frames every second and send them to the server like this.. private void timer_snap_Tick(object sender, EventArgs e) { byte[] bpic; MemoryStream ms = new MemoryStream(); pictureBox_snapshot.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); bpic = ms.ToArray(); if(bpic.Length <5001 && bpic.Length >800) m_VideoSocket.Send(bpic); ms.Close(); ms.Dispose(); } The socket will in fact be actively busy sending the data. It's therefore unlikely the SendTimeout will trip. UDP is much better for streaming video than TCP. UDP has much less overhead since it doesn't ensure ...Show All
.NET Development Open DataReader associated with this Command
SqlConnection conn = new SqlConnection("Data Source=server;Initial Catalog=db;Persist Security Info=True;User ID=xxx;Password=xxx"); public Form1() { InitializeComponent(); this .conn.Open(); this .GetConn(); //Creates first reader this.GetConn(); //when I try to create second reader it throws exception } &nb ...Show All
Windows Forms Dynamic User Interface
Hi, I'm starting to work a new windows forms application (.net 2.0), the problem is that the Interface needs to built dynamically. I have no idea how to achive this, can anyone recommend an approach My first, and only, idea is to use an XML file with one element representing a single control However I'm unsure how efficient this is. Any help would be much appreciated. Mark Hello All. Mark: No, I can't say that I've run across anything, but that's not to say that there isn't anything out there, as I haven't really been looking. Sorry. As I say, from what I understand, WPF uses XML as a basis for the UI elements, so you might want to get the .NET 3.0 SDK and look through the WPF and see ...Show All
Windows Forms image transparent background
I want to add an .bmp image to a label. The image has a transparent background. When I add the image the transparent part becomes white. How can I add the image to the label in a way that the background will not turn white. thanks I am not sure what I did - but I converted the image to a png with one layer, and then set the transparency afterwords. It now has a transparent background. Thanks ...Show All
Visual Studio 2008 (Pre-release) Changing the Color of a Row On a ListView
I'm trying to set up a listview control where if a row meets a condition i want it to change the color of the text for that row (red) else it should be the default color. I have it bound to a dataset. Could someone point me in the right direction Thanks Hi A.Carter, At a quick glance, it appears that you are trying to examine the data sources rows. However, what would probably work better is examining the contents of the ListView. Either that or you may want to examine implementing a Data Template. ...Show All
SQL Server Rule of thumb about number of attributes and data points?
This is a general question about data modeling. I'm more curious than anything else. There is much talk about over-training data model, and I'm sure there are under training as well. As a rule of thumb, depending on the algorithm, what is a good ratio of attributes vs data points -Young K Overtraining basically means that you have a model that fit your training data very well. But the model performs very badly on unseen data. For example, if you are training a decision tree, the alogrithm you use may generate a decision tree to fit your training data perfectly. This can be easily achived by keep creating split until each node only contains data points from one sepcific class. In general, this kind of decision does not gene ...Show All
