JSR2005's Q&A profile
Smart Device Development prob with Dns.Resolve(). Plz help!
Hi, I've a strange problem with the Dns.Resolve() method. My app actually needs to use socket connection to connect to a remote server. Right now the server app is running on my local machine. So my app needs to connect to the local server. For this, i use Dns.Resolve() by passing my pc name as the argument. Heres the code IPHostEntry add=Dns.Resolve("pocketpcpp"); IPAddress ip=add.AddressList[0]; And the problem is the ip is assigned some wrong IP for the first time. Later on its assigned the right IP. What could be the problem The IP that is returned for the first time is some thing vague, like "7.0.188.150". Where am i getting this IP from And its not the IP of the emulator. However the na ...Show All
Visual C# how to convert current date to number of seconds since 1970
Hi all, May I know is there a function that can convert the current date (yyyy/MM/dd) to number of seconds since 1970 Thanks Hi, bslim Here is the function: public int calculateSeconds() { DateTime dt = new DateTime (1970, 1, 1, 0, 0, 0, 0, DateTimeKind .Local);//from 1970/1/1 00:00:00 to now DateTime dtNow = DateTime .Now; TimeSpan result = dtNow.Subtract(dt); ...Show All
Visual Studio Tools for Office Outlook /resetfolders /cleanreminders
Hi ALL, I was woundered to know if there is possibility to resetfolders && cleanreminders programatically, suppose when my Outlook AddIn starting up . Or maybe to resetfolders && cleanreminders but without launching the Outlook, cause regular user don't know how to run Outlok from command line (outlook.exe /resetfolders /cleanreminders), they simply click the Ooutlook icon or the Outlook starting up on windows loading. Any suggestions First question is why do you need to run this method Secondly there are several things you could do but depending on your level of access and infrastructure. Basically Outlook stores properties like this in a special hidden message that you will ...Show All
SQL Server .Net Framework 2.0 and Sql Server 2005
Does anyone know if there are any issues with .Net Framework 2.0 and SQL Server 2005 Here is my problem ..... I have a web application running on a Windows 2003 Server SE with IIS 6.0. We recently migrated all of our databases to SQL Server 2005 and now we are getting an exception when retrieving data from the DB (Exception Below). We have switched our databases back to Sql Server 2000 and the problem does not occur. Any Help would be much appreciated. -Ryan Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: 7/3/2006 Time: 10:15:46 AM User: N/A Computer: WEBSERVER12 Description: EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 system.data, P5 2.0.0.0, P ...Show All
Visual C++ MFC Dll Project?
When given a problem that involves quantum interactions, behavior among particles such as atoms etc.: (using: MS VC++) Would you create an, MFC Dll Project Would you take another path Thanks very much for any and all (no matter how minor) info. in regards to above question(s). B. John tnks so much for quick reply. will sit down and compose something more succinct (if you require), without giving away what im going to accomplish (someday). would feel better with email to email, but want others with ideas similar to mine to have the knowledge you are giving to me for free. basically, i'll use formulas (with variables, variables which program will attempt to solve for; made it thru calc. 3, diff. eq., linear alg. ...Show All
Visual Studio Express Editions Problem to save a table
Hi, I've a problem when creating a table, it creates the table and it includes the registers, but when I leave the application the table isn't saved in the database. I've already modified the property of the database to Copy if Newer. Dim nome As String = "TESTE" Dim cmd As Integer Dim query As String Dim sqlComando As SqlCommand connBD = New SqlConnection(strcon) query = "CREATE TABLE " + nome + " (CodTeste Integer, Nome nvarchar(50))" sqlComando = New SqlCommand(query, connBD) & ...Show All
SQL Server print from toolbar
Hello, I have created an asp.net application using VS .Net 2003, which has a Report Viewer to include reports from my report manager. The reportviewer has been set to include the standard toolbar, which includes the print button. However, when I use this option, the system prints more pages than it should. If the report is 2 pages long, I end up getting 6 pages, the other four having just the header and footer...(2 blanks pages after each page when port. ana 1 black after each page if landscape) Any1 know the solution to this problem I have not coded anything for the print option.... Thanks :) ...Show All
Visual C++ Nested classes and friend functions
I was wondering if someone might be kind enough to help me with a problem I have compiling nested classes with friend functions that are members of the enclosing class. For example: If I have class A which has class B nested inside it: class A { public: class B { private: int private_member; public: friend void A::friend_function(); }; void friend_function(); }; I have tried compiling the above (with friend_function() suitably defined of course) with other compilers and it works fine. Visual C++ screams with multiple definition errors however. Different errors appear if I comment out the friend_function definition in class A. What is the protocol for implementing code of ...Show All
.NET Development Calculated fields?
Hi, hope you can help. I have a Data Access Layer that uses DataView to provide data to my UI. I have a simple grid on my UI to display this data. The table is concerned with scheduled maintenance jobs and it has lots of fields for recurrence patterns. However, in my UI I want to display a human-readable version of this pattern. For instance: My table looks like this: TaskId FirstActionType FirstActionDays FirstActionDistance RecurringActionType RecurringActionDays RecurringActionDistance But in my grid, I want something like this: ACTION RECURRENCE PATTERN Job A Starts in 30 days or 1000 miles, whichever is sooner, repeating again every 60 days or 5000 miles, which ever is ...Show All
SQL Server SQL 2005: Query is not using non-clustered index! Need to avoid hints!
Greetings, I have two tables: CustomerOrder ---- ID CustomerID StatusID CustomerOrderDetail ---- ID Order_ID StockID Quantity CustomerOrderDetail table has clustered unique index for ID and non-clustered for Order_ID SQL Server 2005 is using table scan for CustomerOrderDetail table When I user the following query: select cod.* from CustomerOrder co inner join CustomerOrderDetail cod ON cod.Order_ID = co.ID where co.StatusID = 8 -- Pending Both of the tables are pretty big, detail table has more than million records, so scanning the table is a bad idea. When I specify hint to use index then sql seeks, but how do I make SQL server to use index automatically I don't want to use hints in my queries. Thanks! ...Show All
SQL Server Replication Configuration?
Our website and sql database are hosted away from our offices and is updated via the web by customers and by us in our offices. However due to our slow internet connection we would like to bring a replication server into our office and have the two databases talk to each other when a change occurs.(Customers updating the public database and us update a local one). I have seen sites mention circular replication is troublesome and may not work, is this the case or is it just a matter of correct configuration Any advice, tips etc would be appreciated. Thanks John I posted this on a different thread, but I think it applys to you as well. Here is a direct quote from BOL http://msdn2.mic ...Show All
Visual Basic Print Data report on Dot matrix printer in Visual Basic
Hi pals, I have to print data report on the dot matrix printer on th roll feed sheet without eject the paper in visual basic... if any body have solution for this plz send me the code... regards raja prabu chennai You can try something like this: http://support.microsoft.com/default.aspx scid=kb%3bEN-US%3bq175083 Or http://support.microsoft.com/ scid=kb;EN-US;322090 ...Show All
Microsoft ISV Community Center Forums Forms Text Input
Hi All... I have an EXCEL workbook with two sheets A & B On Sheet A i have a Display Page with Various vlookups from Sheet B ... I created a Form which has a text box '1' with a number which is taken from Sheet A (a3) & an other empty text box '2' which is also taken from sheet A (comments d5).... What i need is a string that takes the text that is inputted in t extbox2 on the form finds the number which is on textbox 1 on Sheet B and inserts the text in same row but in the a different column of sheet B . I hope u can help me ...cos i am going nuts !!! Here's a quick script I whipped up that will do what you want. You'll need to tweak it a bit to make it fit your needs exactly. Ba ...Show All
Software Development for Windows Vista Track HandleExternalEventActivity states?
Hi I have a couple of custom activities which inherits from a class EventBase which inherits from HandleExternalEventActivity. My plan is to use SqlTrackingService to track whenever a workflow instance enters/completes such an activity. The idea is then when the host should raise an event it could query the SqlTrackingService for all instances that has entered the corresponding activity (but not completed meaning they are currently waiting for the event). And then the host would know which instances to raise the event to. My question is how such a query for instances that are qurrently inside an activity should look like In other words I would like to ask the SqlTrackingService "Give me all instances currently waiting for eve ...Show All
Visual Studio Express Editions Issues using the keydown event
I am new to visual basic 2005 Express Edition (I learned in Visual Basic 6.0). I have been creating a tetris game for fun to learn the new modifications on the visual basic language. I have run into a problem concerning how to use the key down event to register when the user presses an arrow key. I used the help function and came up with this: Private Sub frmTetris_KeyDown( ByVal sender As Object , ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me .KeyDown Select Case e.KeyCode Case keys.right etc etc. End Case End Sub (I left code out) I cannot get it to respond to my keystrokes, and i cannot figure out why. At one point it did respond, but i corrected an error in my ...Show All
