Jonas.S's Q&A profile
SQL Server is there anyway to raise a warning from a UDF (in sql2000 and/or in SQL2005)
cos RAISERROR isnt callable, but I really want to indicate a non-fatal warning to be passed back to the client (C++ code) In SQL Server 2005, you could replace the TSQL UDF with CLR UDF and raise exception in your CLR code. But this is not a pretty implementation and depending on the TSQL code you will get worse performance. So best is to modify the UDF to a SP or just check for absence of row or special value like NULL. ...Show All
Visual Studio Express Editions how can we analyze the contents of datagrid view into excel?
how can we analyze the contents of datagridview into excel like in ms access...after query we we can analyze it in excel how can we do that One idea. Use a Reportviewer to export data from a Report to an Excell or PDF file. Of course that the reportviewer is a control to print data to a printer, but still it can export data to Excell. You have to create a new form with a reportviewer, and a report where you place the fields that you want to export. Best regards. dp ( www.webhostservices.biz ) ...Show All
SQL Server How to impersonate user for data on another server?
Hello all, I have a quick question. The sql reporting server is on server A, and the actual data for the report is on a sql server 2005 called server B. When I am actually developing my report and click preview, everything works perfectly using windows authentication. However, whenever I publish and try to view the report, i get this error: An error has occurred during report processing. Cannot create a connection to data source 'serverB'. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How do I change the login for this datasource while still using windows authentication and not mixed mode Thanks Go to the data source properties in the Reporting Services Manager and you can put in a Windows o ...Show All
Visual Basic Data update problem
Hello guys, I am failry new to VB.NET 2005 and would like some help from you guys if you dont mind helping me. I have a dataGridView called wr130dg having 5 cloumns of which the 5th column called donecheckdgcolumn is a checkbox column. I want to update only those records where the user checks the checkbox in the wr130dg. This update depends on the first 2 columns namely MoNodgcolumn and SeqNodgcolumn. In short it means that I have to find all the MoNo and SeqNo in the datagrid whose values in done column is ticked and update the date field of the databasetable to current date and done field value to 1. The code I am using to display the data in the wr130dg is: Private Sub OK_Button_Click( ByVal sender As System.Object, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Drawing
Hello, I am new to XNA (and game dev in general), but I was wondering if there was anyway to draw directly to the screen in XNA Kind of like GDI+ in .Net. Thanks A red rectangle does not need a texture but it does need 2 triangles. Find a 'draw a triangle' tutorial and add a 2nd triangle. If its just a 2d triangle then make a texture which is a single white pixel, then render it to whatever size you want using the SpriteBatch class. Change the color by passing in a different color to the spritebatch.draw overload ...Show All
Smart Device Development CF 2.0 based app is using two MainMenu Control types.
Hi all, I have this strange problem/issue that I have had bothering me for a while now. I have an application where the users browses through Forms to perform various bits of functionality, and then closes the form to return back to the previous form (the Form from which it was openned), and the Focus is right back with the Form that openned the closed Form (if you know what I mean :)). Now this all works fine in my application apart from in one place, where when the called Form is closed, the calling form (or my Application even) doesn't get focus back until the 2nd tap on the application with the pen. The Windows start button and Input control on the MainMenu are focused and can be activated from the first click on them, but not my appli ...Show All
SQL Server T-SQL Scritp to Calculate the last 6 months of data in a Date field.
Hi there, if any body out there has done this before, can you please post the T-SQL script that calculate whatever last months of data based on a Date field. Thanks very much, Manny day 1 of six month early: SELECT DATEADD(mm, DATEDIFF(mm,0,getdate())-6, 0) Day1 of this month: SELECT DATEADD(mm, DATEDIFF(mm,0,getdate()), 0) You query for the last six month: SELECT otherColumns FROM yourTable WHERE YouDateColumn>= DATEADD(mm, DATEDIFF(mm,0,getdate())-6, 0) AND YouDateColumn< DATEADD(mm, DATEDIFF(mm,0,getdate()), 0) You can change the getdate() to your input date, it would be better in a parameter to get whatever date you want. ...Show All
SQL Server SSIS: Oracle import works, but not when scheduled
Hi, I am running SQL Server 2005 and have built a simple SSIS package to import data from an oracle database to my SQL Server 2005 database. When I run it in SSIS, it works and it imports just fine. When I schedule it, it gives me problems. Help! It might be a problem with Oracle Provider client I installed. Is there a client version I can download and install the one I downloaded from oracle doesn't work. I bet i did something wrong though. Here is my version: Microsoft SQL Server Management Studio 9.00.2047.00 Microsoft Analysis Services Client Tools 2005.090.2047.00 Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324-1447) Microsoft MSXML 2.6 3.0 4.0 6.0 Microsoft Internet Explorer 6.0.3 ...Show All
SQL Server Install Error at end(I'm tired and impatient, and i'm sick of microsoft)
This is exactly what I do with the MS SQL 2005 Express-Advanced installer. Accept>Next Required Components Installed Successfully>Next "Welcome to the....">Next 13 Success, 2 Warning: Minimum Hardware, IIS Feature Requirement>Next Set name/company+hide advanced options>next Accepted default install options>next Windows Authentication>next none checked>next Install ERROR: An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'. Setup Failed: SQL Native Client, SQL Server Database Services. I got the same problem with the non advanced installer, and I even selected all the options for ...Show All
Visual Studio Performance on large assemblies
Sandcastle (Dec CTP) takes a long long time to build when given a largish assembly to document. Our project isn't that large (XML file is 19 MB, DLL is 6 MB) (134 494 elements says CopyFromIndexComponent - which generates 36 000 topics) but Sandcastle takes some 10 hours to build using the SHFB tool. We used to use DocumentX and HelpStudio from Innovasys and it would generate the documentation in a bit over 2 hours. Is there any chance that the next CTP will be faster I've resolved most of the slow build issues. The last one remaining is adding missing documentation tags. Most of the issues were related to the size of the reflection information file and performing XPath queries on it. I've reworked the code and those steps now all ...Show All
Visual C++ few queries
hi frnds, i have two question 1) what is the type of pointer 2) difference between oops and procedure oriented approach sGurpreet wrote: 1) what is the type of pointer int* x <- pointer to int char* y <- pointer to char And so forth. sGurpreet wrote: 2) difference between oops and procedure oriented approach http://en.wikipedia.org/wiki/Object-oriented_programming You'll have to excuse me for being so vague, but these are questions which are covered in just about any programming book you can find. I suggest you get one of those :) ...Show All
Software Development for Windows Vista SqlDatabaseActivity can't handle output parameters when calling a stored procedure
Dear all, I have just run into a problem with SqlDatabaseActivity which I downloaded from Microsoft. It doesn't understand output parameters in stored procedures, so it never returns any values for them. It assumes that all parameters are input only. I had previously discovered that it didn't handle @RETURN_VALUE, but fixed it myself. The failure to handle output parameters looks more fundamental, so I am reluctant to embark on trying to fix it. Is there a version of the activity which resolves this issue Dear Angel, I tried to do that, but the upload page doesn't actually upload anything - it assumes the file has been placed at a publicly accessible URL, which I do not currently want to do. I will email the z ...Show All
Windows Networking Development Problem with WSAWaitForMultipleEvents does not apparantly cancel its event
I use LabWindowsCVI version 8.0.1. I set up an event with the lines hWSADataRecv = WSACreateEvent(); intRetVal = WSAEventSelect(intUDPDataSocket, hWSADataRecv, FD_READ); intRetVal = CmtScheduleThreadPoolFunction (hEtherThreadPool, etherDataPortRecv , 0, ðerDataPortRecvThreadFunctionID); and then in the thread the lines are used: while(intQuitting == 0) { if((dwEvent = WSAWaitForMultipleEvents(1, hWSADataRecv, FALSE, 100, FALSE)) == WSA_WAIT_EVENT_0) { if((intNumBytesRecv = recvfrom(intUDPDataSocket, &ucDataBuf0[intBufferPosition], strBufLen, 0, (LPSOCKADDR)&AddrDestData, &fromSize)) < 0) { etc. This starts fine and waits for an incomming packet. As ...Show All
Smart Device Development Where do I place files used in my app running through an emulator?
Hi all, I am testing my application through an Emulator, and it is meant to make use of an image file . The line of code is as follows... factory.CreateImageFromFile("Camera.png", out img); But where do I actually place this file I have dropped it in the 'bin\debug' folder as this is where the exe is running from, but I still get a FileNotFoundException :( Hope you can help. Thanks I dont think they do but worth checking it out, try it and experiment see what happens. When I tried it, I saw the .NET CF 2.0 cab installer getting deployed, if the device does not have .NET CF 2.0 for example, and along with it the debugger cab file. ...Show All
Visual Studio Tools for Office auto_close addin unload
I have addin which unload on "auto_close". but i noticed that if user has modified the Excel sheet and try to quite excel, Excel is showing dialog to confirm to save changes. If user click "Cancel" for it ,still auto_close is invoking. So what is best way to verify user have clicked "Cancel" button and don't unload the add-in No this addin is in VBA . Which loads when excel launche and unload when user quit excel. After load of Addin I create my custmized menu. which I delete during "auto_close" macro. But when user try to quit excel ,excel show message "There are unsaved changes. Do you want to save it " with "Yes","No" and &q ...Show All
