robertje's Q&A profile
SQL Server Insert and Update at the same time
Question1 How can i Insert into 2 table and update the table at same time Example TableA ##TMP INSERT INTO ##TMP Select * FROM TABLE TABLE A WHERE XXXXX =XXXXX UPDATE Indicator field in the Table A when there is a record insert into ##TMP Question 2 How can i Insert the data into 2 table at the same time INSERT INTO TABLE A,TABLE B SELECT * FROM TABLEC WHERE xxxx= 'xxxx' Please advice , is there any other short cut to do this Also, if you want to insert into two tables you can do something like this: insert into tableA output INSERTED.* -- or whatever into tableB select relevantValues from tableC Dave ...Show All
Visual Basic Panel Opacity?
Is there any way to make a panel have 50% opacity Panel does not have the Opacity property like forms so I do not believe there is a way. You could try asking this question in the Windows Forms group. If there is a way someone over there will know the answer. http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=8&SiteID=1 ...Show All
Visual Studio Team System Team Foundation Build and DB project.
We have a DB project that we have created a team foundation build type for and which does run fine, at least no errors in log file, but it does not create the output sql scipt file. If I build the db project from the build menu within the VS IDE it will create the .sql script file in the specified directory ok or if I use msbuild it also works fine. I have seen some documentation about modifying the tfsbuild.proj file along with the dbproj file for actually deploying the DB but at this point I only want to create the SQL script file using the team foundation build. Is this possible to do I am currently using latest TFS along with VS and SP1 applied to everything including the build machine. It ...Show All
SQL Server format weekNum
I want insert to parameter default value that take the numWeek of the current date I fount in the BOL: d Short date D Long date t Short time T Long time f Full date/time (short time) F Full date/time (long time) g General date/time (short time) G General date/time (long time) M or m Month day R or r RFC1123 pattern Y or y Year month but there not the WW. (what I mean in SQL-SERVER I write: DATEPART(ww, dbo.tbl_CA_mishmeret.mishmeretDate) ) how can I get the week Num thanks! and another question from the second side: I have in filed ...Show All
Smart Device Development Limit textbox entry
Hi, Does anyone know how I can limit textbox entry so that the user can only enter two numeric characters after a "." has been entered You can use the TextChanged event to catch when the user inputs characters and make sure it's in the right format. It's a little bit of work but I am pretty sure that the textbox control that comes with VS2005 does not support filters. ...Show All
Visual C++ fatal error C1189 -Plz Help
Please help, How can I fix this error: Error 1 fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxver_.h 77 Many Thanx Go to Project Properties, Configuration Properies, C/C++, Code Generation and in the Runtime Library field select Multi-threaded Debug DLL (/MDd) for a Debug build and Multi-threaded DLL (/MD) for a Release build. ...Show All
Visual Basic MySQL
Using MySQL to store my information on my server and I am writing a program to read/write to it. I am using an example on the web click here to setup my Login screen. Im having problems with the Imports MySql.Data.MySqlClient . I have gone to MySQL.com and downloaded the connector but I can't seem to get things working right. What am I doing wrong Well, I am trying to write a program that will display information from my MySQL server and I also want to write some data to it but I don't know the first place to start with the setup of the MySQL. QWERTYtech ...Show All
Smart Device Development Configure the emulator to use physical computer internet connection
Hi, i’m using VS2005 and PocketPc 2003 Second Edition. in my physical computer i have a internet connection. how should i configure my emulator to use that connection Thanks SP hi, try to download this document from here , it might solve your problem (maybe). ...Show All
SQL Server CLR integration problem
Hello, I wrote an assembly with refernce to another assembly (the referenced assmbly is framework 1.1 assembly, i don't have its source code). I tried to load the assembly to SQL Server (reate Assembly...) and got the following error: reate failed for SqlAssembly 'OptimalTest.Statistics'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+SqlAssembly&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ----------- ...Show All
Visual C# Before we proceed I really need some protection!
If I were to make a C# program that contained a sensitive algorithm, how could I protect it I know that C# generates MSIL (this is what has me the most concerned), is there any way to get the compiler to scramble it or some thing The last thing I want is my code decompiled. I probally should have made a native C++ project, but it is so hard to motivate your self to do so when C# is sitting right in front of you. When the compiler declares variables in MSIL does it name them what you call them in C#, or does it assign them more machine like names Any suggestions would be helpful. Another problem is all the obfuscatrors Ive seen are really expensive. I would be willing to shell it out but: As it stands I ...Show All
Community Chat Secure Communication Program!!!
I have developed a Secured Communication Program in C# 2.0 Currently Encrypted Chat and Encrypted File Sharing is possible with it. Application uses 2048 bit RSA Encryption of Key exchange and 256 bit Rijndael Encryption for all other Communication. 2 Pass Encryption with Unique Messaging System. i.e No messages is repeated in Encrypted communication for example if you right "Hello" for 1000 times, all times it'll be encrypted to different data and sent over the wire. I'm working on Next Beta version which will be released prior to 5th November and will fix some of the known bugs and include Unicode Support! Further Pocket PC version and Enterprise version are coming in around 2 weeks! I can't write more . So ...Show All
.NET Development Reading row row with using ODBC
I have research for hours but I couldn't find yet. I want to get the rows in database. The @"reader" method running by getting colomn datas. I don't want to get datas by colomn, I want the datas as row row. Forexample, at first getting first row then second row etc. Regards... Thanks for no helping... I have solved it. OdbcDataReader reader1 = com1.ExecuteReader(); while (reader1.Read()) { for ( int i = 0; i < reader1.FieldCount; i++) MessageBox .Show(reader1 .ToString()); } ...Show All
Visual C# Output parameters not working
Hi All I'm trying to get somme code to work but it just won't and I can't figure it out! I'm trying to get soem information from a database using a uniqueidentifier key field. I want to take the information out of the databse using output parameters. I've created the follwoing code: string ConnectionString = WebConfigurationManager .ConnectionStrings[ "plss" ].ConnectionString; Guid UserGUID = new Guid (userID); SqlConnection conn = new SqlConnection (ConnectionString); SqlCommand cmd = new SqlCommand (); cmd.Connection = conn; cmd.CommandText = "plss_Users_AllUserData" ; cmd.CommandType = CommandType .StoredProcedure; cmd.Parameters.Add( new SqlParameter ( "@M ...Show All
SQL Server Reports + Setup
Hi, I need to create a setup project that will create a new folder in the Reports Server. The folder should contain all the reports I have developed. The folder should have a browse permission for a user that I will choose (from the Active Dir.). Everything must be programaticlly. In other words, I need to create a folder and set the permissions for it using code. Is there a way Do you have something in mind 10x, Solved it using the followings: for the folder creation part: _service = new ReportingService2005 (); _service.Credentials = System.Net. CredentialCache .DefaultCredentials; _service.CreateFolder(directoryName, "/" , null ); for the security part: Role role = new Role (); ...Show All
SQL Server Unpivot Transformation and Expressions
I am using the unpivot transformation, but I can't figure out how to use an expression in the Pivot Key Value. The denormalized table I want to unpivot has columns like Sunday_Qty, Monday_Qty, Tuesday_Qty, etc. Just before the unpivot component, I inserted a derived column component that adds fields like DateSun, DateMon, DateTue, etc. that resolves to values like 01/07/2007, 01/08/2007, etc. So for the various rows in the Unpivot Transformation Editor, I entered DateSun, DateMon, DateTue, etc. for the Pivot Key Value, and "EntryDate" for the pivot key value column name. The data pipeline gets unpivoted correctly, but the rows have the literal values "DateSun", "DateMon", etc. in the EntryDate column. ...Show All
