edukulla's Q&A profile
Microsoft ISV Community Center Forums SQL within a VBA Module
Hi, I'm new to VBA and have only been using it for 3 months, so please don't laugh! I have a VBA routine in Excel, which connects to a SQL Server database, and I need to know how to incorporate an IF expression into the SQL statement. The SQL looks like this in the MS Access query I am trying to re-create: SELECT IIf(IsNumeric([PromoSource]),"REC",IIf(IsNull([PromoSource]),"OTHER",IIf([PromoSource]="WWW","Web",[PromoSource]))) AS [Promo Source], Count(dbo_tblCustomers.CustomerID) AS CountOfCustomerID FROM dbo_tblCustomers WHERE (((dbo_tblCustomers.DateEntered)>=#1/1/2006#)) GROUP BY IIf(IsNumeric([PromoSource]),"REC",IIf(IsNull([PromoSource]),"OTHER",IIf([PromoSource]= ...Show All
Visual C++ How to write on Windows desktop from C/C++ code ?
I want to display on my desktop some useful informations like my IP, MAC address, current time, etc.. Is it possible to write these informations directly on Windows desktop from C/C++ code Any ideea There is something called an Active Desktop, at least that is what it was called in the past. It allows use of a HTML file for the desktop and then you have a very flexible way to customize the desktop. It has been a long time since I tried it so I might have the details wrong. You can ask in another forum or a newsgroup about this. In XP, when I click on the desktop and select Properties I get a Display Properties box. When I go to the Desktop tab and click on the Customize Desktop button, then click ...Show All
Software Development for Windows Vista Windows SDK Integration with VS 2005 on Vista 5536
I don't know what I'm doing wrong. I have Visual Studio 2005 installed and running. I am able to compile most of the WPF samples (that I've tried) like WPFSamples/Demos/15Puzzle, CubeAnimation, etc. This is all running on Windows Vista build 5536. Now I would like to create my own xbap projects. So I download the Windows SDK from http://www.microsoft.com/downloads/details.aspx FamilyID=117ecfd3-98ad-4d67-87d2-e95a8407fa86&DisplayLang=en which specifically says that it works with build 5536 (and 5600) and installed it. Items show up in the Windows start menu. But no new project types show up in Visual Studio 2005. Am I supposed to download anything else According to http://windowssdk.msdn.microsoft.com/en-us/library/ms752087.aspx ...Show All
Visual C++ Strange problem with a c file with subroutines
Hi everyone, I have a very weird problem with this program: with Visual C++ compiler it isn't compiled (the compiler says " missing ';' before 'type'" ) and with another IDE it works, but the return value is always 0.0. Could anyone help me Thanks #include <stdio.h> #include <stdlib.h> #include <math.h> int inCylinder_1( double , double , double ); double distance( double , double , double , double , double , double , double , double , double ); int main() { double x,y,z; printf( "%s" , "Insert point coordinates: " ); //scanf("%f%f%f",&x,&y,&z); x = 1.0 ; y = 1.5 ; z = 0.5 ; int inCylinder = inCyl ...Show All
Visual Basic Menustrip missing!
i have put a menu strip in a table in a tab control. can/should that be done. anyway when i just make it, its there, after a while of working it it isn't. even when i make a new one. i tried bringing it to the front but it didn't work. IceAngel89 wrote: i mean the table layout control. i am using VB 2005 express edition and .Net Framework 2.0. ya its set to visible, enabled and whatever i find correct. the thing is when i click the control name from the bottom bor(not sure what is it called, houses the timers etc) in design mode, it appears then when i click away it dissappears. Any Help ...Show All
SQL Server Company Dimension
We deal with multiple vendors who provide us information via text/xml files. Vendor A may provide financial data, vendor b provides litigation data, vendor c provides ratings data. Our current structure has databases for each vendor with its own company table which basically makes all this data disconnected. Of course each vendor has its own proprietary company id to make records unique. All of the data is based on companies so the grain of data would be at a company level. I would like to be able to link this information together by creating a dimensional model that has a single company table (DimCompany) and has facts populated based on the type of data we receive. Would this be the right sequence of events 1. My initial load (h ...Show All
SQL Server NULL Attribute values in XQuery
the .Query method doesn't seem to abey the normal rules for NULL values. If I specify an attribute as NULL using the sql:variable function the NULL is treated as an empty string. This is unlike other areas i.e. FOR XML and OPENXML that treat a NULL as a missing attribute. declare @message xml set @message = '' declare @jobid int declare @fingerprintId int declare @action varchar ( 10 ) set @jobid = 23121 set @action = 'INSERT' set @fingerprintId =NULL SELECT @message . query ( '<fingerprintSearchModify fingerprintId="{sql:variable("@fingerprintId")}" jobId="{sql:variable("@jobId")}" action="{sql:variable("@action")}" ...Show All
Windows Forms datagridview cell selecting
hi, i have a datagrigview with columnheader and rowheader . the default behaviour for the topleftcell click is to select all cells. is there a way to bypass this functionality ( none cells selected ) or to disable that cell thanks thank you, Zhi-Xin Ye i verified that ... succes i worked with OnMouseDown but i did not 'see' the HitTest solution ... thanks again and to all others ...Show All
SQL Server Schema Problem?
background: local reports tied to a dataset, webforms, SQL 2005 Reporting Services. Event: Checked in report via source safe and network failed in the process. Once network was back online an extra field was added to the stored procedure and the dataset in VS 2005 refreshed just fine. Refreshed folders, looked at dataset schema and everything seems fine. Problem: My report refuses to notice that the dataset has now changed and doesnt like the new field. How/What do I refresh to get this connection working properly again (connection between my report and my new dataset). Is there actually a report schema oh and p.s. after compiling it gives me an error and even after running the app it runs. Oh and I deleted temporary as ...Show All
Visual Studio Team System CTP6 Build/Deploy with TeamBuild - Help needed
I am new to the CTP6 and I have been tasked with showing how to use Team Build to build/deploy the database changes back to a Staging environment from the Isolated environment. I have read about a SqlDeployTask that I may need to use, but I am unsure on that. Can anyone give me details on how to accomplish this feat Do I need the SqlDeployTask If so where do I get that from How do I set it up Does anyone have an example I can look at Thanks in advance -paul Hi Paul, Actually, with the changes we have made in CTP6 you do not need to explicitly use the SqlDeploy task – you can just use the Deploy task. For TeamBuild, there is one “outstanding” issue that we recently resolved which is how to specify the Target ...Show All
Smart Device Development How to copy files to PDA using code?
HI, I wanted a special functionality in my code. I basically have two exe(s). One on desktop and one on PDA. I want to send a sql db file to PDA based on first app on desktop; but eventually it will be used by the PDA, so first app only copies from desktop to PDA in the right location so that when PDA exe is started, it opens the saved db file. How can I achieve this I can't figure out any way to copy the file using one code, from desktop to PDA (assuming connection is always there). Can anyone help me please Thanks Please don't expect this community to check your code & identify what's wrong. You should be asking specific questions about the problems faced. Checkout this article http://support.microsoft.com/kb/307256 on rea ...Show All
SQL Server Cannot Register with External Access
I've done a lot of digging, and I can't find the solution to this one. I followed Vineet's instructions to get an assembly registered that can call out to Web services; however, when I try to register, I get the following error: CREATE ASSEMBLY for assembly '' failed because assembly '' is not authorized for PERMISSION_SET = EXTERNAL_ACCESS. The assembly is authorized when either of the following is true: the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission. I tried setting the TRUSTWORTHY option to on, but I still get ...Show All
Visual C++ C++/CLI dll will not load in C# project (repost, with more info )
I have written some code to create high dynamic range images in C++. I need to call this code from C# now, so I've wrapped it using C++/CLI. I've tested it, and it works well. I sent it to my employer, and he got this error: ************** Exception Text ************** System.IO.FileLoadException : Could not load file or assembly ' HDRLib , Version=1.0.2144.16487, Culture=neutral, PublicKeyToken =null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1) File name: ' HDRLib , Version=1.0.2144.16487, Culture=neutral, PublicKeyToken =null' ---> System.Runtime ...Show All
SQL Server SQL For-loop stored procedures
i want to grant exec permissions on all of my user stored procedures. but this process of writing 'grant exec sp_tblAction on public' for each procedure would take years. how can i write a query that loops through all stored procedures, checks if it is a user created procedured, and then grant exec permission for that procedure can it be done tx, Wilmar What version of SQL Server are you using For 2000 these are good answers, but for 2005 if you really want to grant execute on ALL procedures in a given schema (like dbo.) you can use: GRANT EXECUTE on SCHEMA::dbo to Public The nice thing here is that when you add a new procedure it will automatically be available. The downside is that ALL p ...Show All
Visual Basic update command
Hi I am using auto generated dataset and table adapter, but I want to write my own update command based on same dataset and table adapter .I try to write in the form but cannot make it work.please help on this issue. Zaheer Hi I try to override update whith this partial clause.It do not go through this code zaheer Namespace NWINDDataSetTableAdapters Partial Class OrdersTableAdapter Public Overloads Function Update( ByVal ordersTable As NWINDDataSet.OrdersDataTable) As Integer 'Me._adapter = New System.Data.OleDb.OleDbDataAdapter Dim tableMapping As System.Data.Common.DataTableMapping = New System.Data.Common.DataTableMapping Me ...Show All
