Saturday, November 30, 2013

Grouping Issue

Please post DDL+DML, so we will be able to check it and not just playing "the guessing game"


[Personal Site] [Blog] [Facebook]signature


MaintainScrollPositionOnPostback is not working in firefox and google chrome

Hi,


Take a look at this link:


http://www.aspsnippets.com/Articles/ASPNet-MaintainScrollPositionOnPostback-not-working-in-Firefox-and-Chrome.aspx


See also this other thread:


MaintainScrollPositionOnPostback is not working in Firefox?


Regards.




Please remember to Vote & "Mark As Answer" if this post is helpful to you.

Por favor, recuerda Votar y "Marcar como respuesta" si la solución de esta pregunta te ha sido útil.



MaintainScrollPositionOnPostback is not working in firefox and google chrome

ASP.NET questions should be posted in the ASP.NET forums: http://forums.asp.net

for_loop_types_bubble sort

anyone please ,if you may

Multithreading, Multitasking and Asynchronous processes

Hi Mohan,


They are synonyms :)


Multithreading, Multitasking and Asynchronous processes

Thanks for reply Eugene_Astafiev.

Multithreading, Multitasking and Asynchronous processes

Thanks for reply BRAHIM kamel.


From your reply I understood:


Multitasking: Two or more programs executing simultaneously(in the background each program can be multithreaded).


Multithreading: A program executing in two or more threads(solely depends on OS).


Asynchronous: A process in which program is not synchronously executed(jumping between threads).


Hope I understood correctly, Please correct me if I am wrong in anything.


Grouping Issue

Please find the DML statement below:


SET IDENTITY_INSERT [dbo].[BHDDeliveryDet] ON;


BEGIN TRANSACTION;

INSERT INTO [dbo].[BHDDeliveryDet]([BHDDeliveryDetailid], [BHDDeliveryNo], [Currencyid], [Denomination], [Quantity])

SELECT 57, 19, 98, 20.000, 1000 UNION ALL

SELECT 58, 19, 98, 10.000, 1000 UNION ALL

SELECT 59, 19, 98, 0.500, 1000 UNION ALL

SELECT 60, 20, 98, 20.000, 1000 UNION ALL

SELECT 61, 20, 98, 10.000, 1000 UNION ALL

SELECT 62, 20, 98, 20.000, 1000 UNION ALL

SELECT 63, 20, 98, 20.000, 1200 UNION ALL

SELECT 64, 21, 98, 20.000, 1200 UNION ALL

SELECT 65, 21, 98, 20.000, 1200 UNION ALL

SELECT 66, 21, 98, 20.000, 1600 UNION ALL

SELECT 67, 21, 98, 20.000, 1800

COMMIT;

RAISERROR (N'[dbo].[BHDDeliveryDet]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;

GO


SET IDENTITY_INSERT [dbo].[BHDDeliveryDet] OFF;


SET IDENTITY_INSERT [dbo].[Currency] ON;


BEGIN TRANSACTION;

INSERT INTO [dbo].[Currency]([Currencyid], [CurrencyISOCode], [CurrencyCountry], [Currency])

SELECT 97, N'SAR', N'Saudia', N'Saudi Riyals' UNION ALL

SELECT 98, N'BHD', N'Bahrain', N'Dinar' UNION ALL

SELECT 100, N'INR', N'Indonesia', N'Dirham' UNION ALL

SELECT 101, N'MUR', N'Malaysia', N'Dong'

COMMIT;

RAISERROR (N'[dbo].[Currency]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;

GO


SET IDENTITY_INSERT [dbo].[Currency] OFF;


SET IDENTITY_INSERT [dbo].[CurrencyDetails] ON;


BEGIN TRANSACTION;

INSERT INTO [dbo].[CurrencyDetails]([CurDenid], [Currencyid], [Denomination], [DenominationType])

SELECT 479, 97, 1000.000, N'Currency' UNION ALL

SELECT 480, 97, 500.000, N'Coin' UNION ALL

SELECT 481, 98, 20.000, N'Currency' UNION ALL

SELECT 482, 98, 10.000, N'Currency' UNION ALL

SELECT 483, 98, 5.000, N'Currency' UNION ALL

SELECT 484, 98, 1.000, N'Currency' UNION ALL

SELECT 485, 98, 0.500, N'Currency' UNION ALL

SELECT 486, 98, 0.100, N'Coin' UNION ALL

SELECT 487, 98, 0.050, N'Coin' UNION ALL

SELECT 488, 98, 0.025, N'Coin' UNION ALL

SELECT 489, 98, 0.010, N'Coin' UNION ALL

SELECT 494, 100, 500.000, N'Currency'

COMMIT;

RAISERROR (N'[dbo].[CurrencyDetails]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;

GO


SET IDENTITY_INSERT [dbo].[CurrencyDetails] OFF;


JavaScriptSerializer().Serialize returning different results on different machines

All webrelated question should be asked on the ASP.NEt Forum, you get better answers there:


http://forums.asp.net/


But actually it sounds like a problem with JavasScript. And If I am not toally out of the loop what Javascript does depends entirely on the webbrowser interpreting it.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


fileupload error(The SaveAs method is configured to require a rooted path, and the path '../../Styles/uploadsDesert.jpg' is not rooted.)

Just gessing here, but:


It sounds like SaveAs requries an absolute path (a path going from a filesystem root or "rooted path"). But you gave it a relative path. Ultimatively every path must be resolved to an absolute path before doign anything with it (relative paths are mostly a convenient way of writing stuff) and SaveAs apparently cannot do that work for you.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


Grouping Issue

Do you need DML also or is DDL sufficient?

Grouping Issue

I Will wait some min for the DML... If i will have time, i will try to give the answer now before i go out...


[Personal Site] [Blog] [Facebook]signature


Where is layoutTransform?

Microsoft innovations looks like degradation.


Hey guys, we removed DreamScen and cut alot of application from Vista, pay more money for the new Win7!


Hey guys, we removed layoutTransform from XAML for Win8, pay more money for new VS2013!


Are they crazy there?! When it's stop?!!


Why so simple and necessary function as rotate layout was removed?! I have a TextBlock and want to rotate it to 90 degrees. Now it's rotating with render transform and cut the text inside. Have no idea what to do now. Sometimes I want to shoot MS-innovators one by one to stop this kind of innovations. How to do so? I mean... how to rotate TextBlock?


Thanks




Aleksey



I want large collection C# programs for practice

hi


I am using C# more than a year now but I want to learn more and practice more. So i want collection of problem definition with solution. First I try myself to solve the program if I haven't got success then i will see the solution.


Thanks.


I want large collection C# programs for practice

Although I can't suggest a specific website or book, I would recommend just doing a search. Just search on Bing or Google for 'Programming Practice problems' or something similar (maybe include 'C#' in your search term). You should be able to just look through the results there and pick and chose the ones that you want to try.


Wasabi Fan


I want large collection C# programs for practice

Thanks for reply. I will try that.


Parsing HTML files while developing windows 8 app.


They provide APIs but by using their APIs , i am unable to update my app with the latest score i.e ball by ball commentary, live score etc.



You have to explain why you are unable to do theses specific things with the API.


Have you had difficulty using the API calls?


Do you expected some kind of push notification from the API? If so, why is regualry polling those fucntions on a timer not an option?


Do they not have those values availible via the API? Chances are they do not want this data to be automated or used in other places. Trying to do so anyway would be an illegal action, no mater wich way you go about getting them.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


Grouping Issue

Thank you for your reply.


I have attached DDL for your kind reference.


Grouping Issue

Sorry. I have attached DDL for your reference.

Grouping Issue

what is the difference between implementation of DateTime.Now method ??

i created a new instance as follows DateTime mydate=new DateTime(); , now when i am trying to return the current date by using mydate instance , i am not getting mydate.Now property , but i am getting "DateTime.Now" perfectly , i want to know what is the difference between 2 implementations & why the Now property not available with mydate object.??


what is the difference between implementation of DateTime.Now method ??

The .Now property of the DateTime class is static, which means there is only one copy of the property instead of a copy per instance of the class. There would be no advantage to having a copy on each instance as they would all return the same value since the value of .Now is independent of the other properties of the DateTime class. Hope this makes more sense now.


- HomeGrownCoder My posts are kept as simple as possible for easier understanding. In many cases you can probably optimize or spruce up what I present. Have fun coding!


what is the difference between implementation of DateTime.Now method ??

how can i identify whether a particular class is static??

"Package not signed error" while deploying to other system

No windows 8 users can not use windows 8.1 packages unless they do the free upgrade to windows 8.1


Did you try and deploy the package created by visual studio or one that passed certification from the store?


"Package not signed error" while deploying to other system


No windows 8 users can not use windows 8.1 packages unless they do the free upgrade to windows 8.1


Did you try and deploy the package created by visual studio or one that passed certification from the store?



The package created by VS13


Pradeep AJ


I want large collection C# programs for practice

hi


I am using C# more than a year now but I want to learn more and practice more. So i want collection of problem definition with solution. First I try myself to solve the program if I haven't got success then i will see the solution.


Thanks.


I want large collection C# programs for practice

Although I can't suggest a specific website or book, I would recommend just doing a search. Just search on Bing or Google for 'Programming Practice problems' or something similar (maybe include 'C#' in your search term). You should be able to just look through the results there and pick and chose the ones that you want to try.


Wasabi Fan


I want large collection C# programs for practice

Thanks for reply. I will try that.


Background Audio during connected Standby

I have a Windows 8.1 Store App that should play a list of MP3 files in the background.


I have setup the MediaElement to be BackgroundCapableMedia, Registered MediaTransportControls and Declared Background Audio capability.


Yet when I run the app on my Surface RT, after I press the power button on the device, the current song plays till the end and then whatever I do, the app is suspended.


Do I STILL (in Windows 8.1) have to do the 'two media elements' hack as described here to have real BackgroundCapableMedia?


Sub-Select with using of operator IN

Hello Anna,


Yes, you can use sub select in a query with an IN operator; but your question is very vague; what are you trying to archive?




Olaf Helper


[ Blog] [ Xing] [ MVP]

Sub-Select with using of operator IN

You can. However if your list is big i would suggest making it into a table and taking a join with it from your current table.


Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


Sub-Select with using of operator IN

Actually you can Anna1313, But if you could elaborate your problem statement forum would help you better perhaps.




Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


Sub-Select with using of operator IN

Dear friends,I need link with some practical example of using operator IN in Sub-Select query.

I was trying find it, of course, but I was not be successful.

Thanks a lot,


Anna


Sub-Select with using of operator IN

The following query returns the orders that contain "Queso Cabrales" (ProductID=11) product:



SELECT
O.OrderID, O.OrderDate, O.CustomerID
FROM
dbo.Orders O
WHERE
O.OrderID IN (
SELECT OD.OrderID
FROM dbo.[Order Details] OD
WHERE
OD.ProductID = 11
)


sql SUM question



I have a table named Trans, and that is the data contained.



Customer Product Ordered
C1 a 2
C2 b 1
C3 a 1
C1 a 2









I wonder a ordered total summary about product 'a' for every single customer, and I use this query,



SELECT
Trans.Customer,
SUM(Trans.Ordered) AS OrderedTotal
FROM Trans
WHERE Product = a
GROUP BY Trans.Customer




So I get this



Customer OrderedTotal
C1 4
C3 1




But the query above can't return the result like this, so is it possible to write a query that let customer 'C2' in the final result?


Customer OrderedTotal
C1 4
C2 0
C3 1

Thanks, everyone.


Content not Found on Grid app when search is Activated?

Hi all,


We are developing a project in which we have added search capability. But when the search capability is added the content get disappeared.


I have activated the search on keyboard input like this,



protected override void OnNavigatedTo(NavigationEventArgs e)
{
// Turn on type to search.
SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;
}

protected override void OnNavigatedFrom(NavigationEventArgs e)
{
// Turn off type to search.
SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;
}



After overriding these two methods. the content of the grid app is disappeared. I doesnt show anything except the background image.




srithar


Content not Found on Grid app when search is Activated?

Sorry for confusing!!! Actually my problem is while activating the search contract on user key board input. I found it worked in the msdn sample which i downloaded. But it dibnt work in My Grid application template. The problem is i didnt call the search input event at the right place. I solved the problem by calling the search event after the Initialize component.


srithar


Content not Found on Grid app when search is Activated?

Sorry for confusing!!! Actually my problem is while activating the search contract on user key board input. I found it worked in the msdn sample which i downloaded. But it dibnt work in My Grid application template. The problem is i didnt call the search input event at the right place. I solved the problem by calling the search event after the Initialize component.


srithar



Hello there,


I'm facing the same problem now. Can you please exactly tell me which function did you call after this.InitializeComponent();Please reply as soon as possible.


Regards


Layout cycle detected. Layout could not complete

Hi


I am using nested GridView (ListView as a DataTemplate of GridView) and binding some some 1000 item into that. while we binding collection getting following error:


"Layout cycle detected. Layout could not complete"




Thanks & Regards Ravi Shankar


Friday, November 29, 2013

sql query assistance


declare @table2 table(id int,links varchar(20),name char(1))
insert into @table2
values
(1,'test8','a'),
(1,'test1','b'),
(2,'test9','a'),
(2,'test10','b'),
(3,'test11','b'),
(4,'test13','b')


declare @table1 table(id int,name char(1),link varchar(20))
insert into @table1
values
(1,'a','test1'),
(1,'a','test2'),
(2,'b','test3'),
(2,'b','test4'),
(3,'b','test3')

select * from @table2 where links not in (select link from @table1)





Hope it Helps!!


sql query assistance

Based on your sample data (thanks) see a different method.


select * from @table2 t2 where not exists (select * from @table1 t1 where t1.link=t2.link)




Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/



MS SQL optimization: MS SQL Development and Optimization

MS SQL Consulting: Large scale of database and data cleansing

Remote DBA Services: Improves MS SQL Database Performance

SQL Server Integration Services: Business Intelligence


Schema

Please see this link


http://stackoverflow.com/questions/1489872/how-do-i-create-a-sql-table-under-a-different-schema




Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/



MS SQL optimization: MS SQL Development and Optimization

MS SQL Consulting: Large scale of database and data cleansing

Remote DBA Services: Improves MS SQL Database Performance

SQL Server Integration Services: Business Intelligence


How to keep the report structures in all the report pages

Dear Uri,


I placed Tablix control inside of Rectangle control for all these above table structues. Please suggest.


Using the same identifier for a Type and a Class: What is the semantic effect of that syntax?

"In the file Order.cs I found an unusual construct"


There's absolutely nothing unusual about that construct.


"Notice how the identifier Customer is used with 2 different purposes. IIRC, neither C++ nor Java allows such confusing usage."


I don't know about Java but C++ certainly allow something like that:



class foo {
};

class bar {
foo foo;
};

"Does that incantation have a special meaning and consequences?"


None at all.


"ps: I am not even sure whether my subject line is correct - Feel free to correct me."


Type and class are pretty much the same thing. You probably want to say "type and a property" or "class and a property".


Using the same identifier for a Type and a Class: What is the semantic effect of that syntax?


[Moi:] "Notice how the identifier Customer is used with 2 different purposes. IIRC, neither C++ nor Java allows such confusing usage."


[Mike:] I don't know about Java but C++ certainly allow something like that:



class foo {
};

class bar {
foo foo;
};

I was right, but only about Java. In another forum somebody wrote the following:


"This has nothing unusual in C#.


"In Java you would write:




Customer getCustomer()
void setCustomer(Customer customer)



"C# provides a convienient way to declare both getX() and setX() in one single member, usually called X.


skew an image

hi,


how can I let user to skew an image using the four corners of it as in photoshop??


How to Display Details set on Specific Part/Position of the Page

the thing i wanted here is,


Static Report Template with the Dynamic Fields Population, I wanted only the details section to be changed, then all the subsequent rendered Page should be of the template, not the remain values from the first page.


How to Display Details set on Specific Part/Position of the Page

sorry didnt get what you mean by showing 10 rows in specific data region. can you show a screenshot of how you want the report to display?


Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


How to Display Details set on Specific Part/Position of the Page

Dear VmBlogs,


Please find this is the Pre-Printed ticket, There are 4 Datasets coming into this report, where i should bind into these below tables, where in 2 tables, like Right Top table and the bottom table would be having more than 50 to 100 rows, hence this has to be printed in 5 or 10 sheets, so we have to paginate every 10 rows to this specific location of the pre-printed ticket.


I am not able to attach the image, as my profile has not been verified.


Hope you get this clearly.


How to Display Details set on Specific Part/Position of the Page

Sorry didnt get exact layout. If its just paging you want isnt it matter of putting page breaks.


Also for any static part put statements in designer and it will come consistently. FOr places where you need dynamic values you refer fields from the dataset or use them in expressions




Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


How to Display Details set on Specific Part/Position of the Page

Dear Vmblogs,


Please find this the related thread, "Special Report Structure"


Same issue i am also facing it, you will get the idea when you see the above thread and see the attachment.


Special Report Structure

Hi everybody


i have a report with three different Tables with three different Datasets (pls look at the Attachment). When the first Table (1.) has to many Records the Table (3.) will move down automatically. How can i prevent that ?


Special Report Structure

Hello,


I dont think anybody can do much on this. It is simple that the table3 will move down since the report structure is such.


Special Report Structure

Hi there


There is a possibility you can set the number of rows for you table per page.


You need to do this at the group level. If you do not have group, then add one but uncheck the Include Group Header and Include Group Footer. Please Also, check Page Break at Start.


In group by expression please use


=Ceiling(RowNumber(Nothing)/10)


This will limit your page row to 10 records.


I hope this will helps.


Many thanks


Syed Qazafi Anjum


Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.


does the serial port also receives some data when a gsm device connected with that port finds some incoming sms or call ???


hi i m working on a C# Windows form application that could send/receive sms and make/receive calls through the GSM modem using AT commands... i m able to send sms msgs and make calls but


1) i am yet unable to find out the way of how to notify my application when an sms is received on the mobile phone so that i can read it using some at commands


2) how to detect in my application if there is a call coming in on the mobile phone?


3) if the connection is established between the mobile gsm or a GSM modem,,, and next if the gsm device receives an sms or a call does the port also receives some data ???





farooq.hnf


join two diff tables

Hi,


SELECT Car.Col1, Car.Col2, Car.Col3
FROM Car
INNER JOIN Car_Part ON Car_Part.Car_Id = Car.Car_Id
INNER JOIN Part ON Part.Part_Id = Car_Part.Part_Id
WHERE (@part_Id ISNULL OR Car_Part.Part_Id = @part_Id)
AND (@part_type ISNULL OR Part.Part_Type = @part_type)
GROUP BY Car.Col1, Car.Col2, Car.Col3




indu


join two diff tables

Then how are the two tables related? dont they've a column in common?


Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


join two diff tables

Please post DDL and example result data set that you intend to get from query


Thanks, hsbal


join two diff tables


In the below query the Name is in Table2 and Dept is in Table1, in such case how to alert the below query



5Ant,


What sense does it make, Name in Table1 and Dept in Table2. Which is the common column (I am thinking of EmplyeeName). In that case following is the way you could write the code:



SELECT TableName1.<Column Names>,TableName2.<Column Names>
FROM TableName1 JOIN TableName2 ON TableName1.EmployeeName=TableName2.EmployeeName





Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


Sub-Select with using of operator IN

Actually you can Anna1313, But if you could elaborate your problem statement forum would help you better perhaps.




Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


How to Display Details set on Specific Part/Position of the Page

the thing i wanted here is,


Static Report Template with the Dynamic Fields Population, I wanted only the details section to be changed, then all the subsequent rendered Page should be of the template, not the remain values from the first page.


How to Display Details set on Specific Part/Position of the Page

sorry didnt get what you mean by showing 10 rows in specific data region. can you show a screenshot of how you want the report to display?


Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


How to Display Details set on Specific Part/Position of the Page

Dear VmBlogs,


Please find this is the Pre-Printed ticket, There are 4 Datasets coming into this report, where i should bind into these below tables, where in 2 tables, like Right Top table and the bottom table would be having more than 50 to 100 rows, hence this has to be printed in 5 or 10 sheets, so we have to paginate every 10 rows to this specific location of the pre-printed ticket.


I am not able to attach the image, as my profile has not been verified.


Hope you get this clearly.


How to Display Details set on Specific Part/Position of the Page

Sorry didnt get exact layout. If its just paging you want isnt it matter of putting page breaks.


Also for any static part put statements in designer and it will come consistently. FOr places where you need dynamic values you refer fields from the dataset or use them in expressions




Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


Workflow TimeStamp

Hello,


I have a workflow pretty standard with about 5 steps. When i look at an items workflow history I can see that the steps are being completed at a certain time. but these times are in one column in the history list.


Is there a way to create a column for each step, and have the time it was complete/started logged to that column as well?


So i could have 5 columns each for a step, that will show the time that step was started/completed?


Thanks


Workflow TimeStamp

can you use the log this message to history list to log the time that step was completed? It would essentially be a time stamp for the workflow step


Workflow TimeStamp

i think what you need, customize your Workflow and add a extra action on each step to write in history(may called log).check this one, good starter.


http://spandps.com/2012/02/14/writing-history-events-from-a-sharepoint-designer-workflow/


http://fabiangwilliams.wordpress.com/2013/04/24/finally-a-sharepoint-designer-that-developers-and-bas-will-love/


http://www.lynda.com/SharePoint-tutorials/Writing-workflow-log/105501/110627-4.html




Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog



How do I implement an auto-incrementing column in "yyyy.nnnnn" format?

Or you can create a simple SharePoint Designer based workflow which will run on ItemAdded and update the column with your number.


Amit


How to get the album art of a song?

what format is the song? it is up to the file format.




Visual C++ MVP

ssrs 2008 r2 Globals!RenderFormat coding

In an existing SSRS 2008 R2 report, I want to show or hide detail columns based upon all the export options a user can select from. Basically I want to show or hide columns based upon any value a user selects in the Globals!RenderFormat.Name option. However I do not know how to write this code. Thus can you show me how to write this code?

ssrs 2008 r2 Globals!RenderFormat coding

There are 7 built in options for exporting SSRS reports..


I was wondering if there is an easier way to code the following in SSRS when chosing the export option:


=IIF(Globals!RenderFormat.Name="WORD" OR Globals!RenderFormat.Name="XML" OR Globals!RenderFormat.Name="CSV" OR Globals!RenderFormat.Name="TIFF" OR Globals!RenderFormat.Name="PDF", Globals!RenderFormat.Name="MHTML" OR Globals!RenderFormat.Name="EXCEL",true,false)


Is there a way to write the code above without having to list each export option listed? A way that includes all the export options? If so, how would you write that code?



How to get the album art of a song?


Hi..


I'm trying to create an audio player which has a listview in which selected songs get displayed. When I click on one of the songs, it is played. But the main problem is that when I click any one of the songs present in the listview, what codes should I write to retrieve the album art of the clicked song? Please provide me some suggestions urgently.



DB Issue when making app package











Hi,



I'm developing a Windows store App using a local db with sqlite, SQLite for Windows Runtime, sql-net and an existing database. When my App starts it checks if the database is loaded on the LocalState folder of the App, if not it makes a copy of the DB included in the solution folder into the local state. The properties of the DB in the solution folder are set into Content, and copy always. When deploying my App using Visual Studio it makes the copy of the db and everything Works all right, but when I make the App package and install it using power Shell the App is not copying the existing DB, instead it looks like it is creating a new DB with any information nor tables at all. Can someone help me solving this issue please?.



Regards


Sub-Select with using of operator IN

Hello Anna,


Yes, you can use sub select in a query with an IN operator; but your question is very vague; what are you trying to archive?




Olaf Helper


[ Blog] [ Xing] [ MVP]

Report export to word and excel error

After previewing a report i built i keep getting the errors below when attempting to export report to word or excel. The report exports to PDF without any problems. Just very confused about what to do her. Can anyone help please ...................


Export error to Word : An error occurred during local report processing. The body is too complex to export to word. Please group the ReportItems together into rectangles to simplify.


Export error to Excel: An error occurred during local report processing.

Excel Rendering Extension: Number of columns exceeds the maximum possible columns per sheet in this format; Columns Requested: 340, Max Columns: 256




Lummzy


how to calculate givendate is before last sunday of the month or after the last sunday of the month

any ideas please


Thank you

asitti


how to calculate givendate is before last sunday of the month or after the last sunday of the month

here is similar thread might help you http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=125258


http://uk.linkedin.com/in/ramjaddu

how to calculate givendate is before last sunday of the month or after the last sunday of the month

The last Sunday is always in the last seven days of the month.

Here is a function that returns -1 if the wanted date is before the last sunday of the month, returns 0 if the wanted date is the last sunday of the month and returns 1 if the wanted date is after the last sunday of the month.




ALTER FUNCTION dbo.fnIsDayAfterLastSunday
(
@Date DATE
)
RETURNS TABLE
AS
RETURN (
WITH cteCalendar(theDate)
AS (
SELECT DISTINCT DATEADD(DAY, f.Delta, d.LastDay)
FROM (
VALUES (DATEADD(MONTH, DATEDIFF(MONTH, '18991231', @Date), '18991231'))
) AS d(LastDay)
CROSS APPLY (
VALUES (0),
(-1),
(-2),
(-3),
(-4),
(-5),
(-6)
) AS f(Delta)
)
SELECT SIGN(DATEDIFF(DAY, theDate, @Date)) AS Position
FROM cteCalendar
WHERE DATEDIFF(DAY, '18991231', theDate) % 7 = 0
)





N 56°04'39.26"

E 12°55'05.63"

how to calculate givendate is before last sunday of the month or after the last sunday of the month



ALTER FUNCTION dbo.fnIsDayAfterLastSunday
(
@Date DATE
)
RETURNS TABLE
AS
RETURN (
WITH cteCalendar(theDate)
AS (
SELECT DISTINCT DATEADD(DAY, f.Delta, d.LastDay)
FROM (
SELECT DATEADD(MONTH, DATEDIFF(MONTH, '18991231', @Date), '18991231')
) AS d(LastDay)
CROSS APPLY (
SELECT 0 UNION ALL
SELECT -1 UNION ALL
SELECT -2 UNION ALL
SELECT -3 UNION ALL
SELECT -4 UNION ALL
SELECT -5 UNION ALL
SELECT -6
) AS f(Delta)
)
SELECT SIGN(DATEDIFF(DAY, theDate, @Date)) AS Position
FROM cteCalendar
WHERE DATEDIFF(DAY, '18991231', theDate) % 7 = 0
)





N 56°04'39.26"

E 12°55'05.63"

Thursday, November 28, 2013

Convert IDs to Values

Another way is to use a string parsing UDF as below



;With Temp
AS
(
SELECT UserID,Email,ID,Name
FROM
(
SELECT u.UserID,u.Email,f.ID,f.Val
FROM User u
CROSS APPLY dbo.ParseValues(u.PublicationIDs,'|')f
)m
INNER JOIN Publication n
ON n.PublicationID = m.Val
)

SELECT UserID,Email,
STUFF((SELECT '|' + Name FROM Temp WHERE UserID = t.UserID AND Email = t.Email ORDER BY ID FOR XML PATH('')),1,1,'') AS PublicationNames
FROM (SELECT DISTINCT UserID,Email FROM Temp) t



ParseValues can be found here


http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html




Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs


How do I Join Calendar table with other tables with sparse dates

From your join conditions, I would assume that the key for all three tables is (Brand, Vector, xxxxDate). In such case, I am somewhat in doubt of what output you are looking for. I can see that if there are no rows for a certain date, that you want 0 for all three Qty columns. But what if there for a certain Brand and Vendor there is on row on a certain day?


On the other had, if you also have tables with all brands and vendors, it makes more sense - and the query would actually be easier to write.


Generally, for this type of question, it helps a lot if you provide sample data as INSERT statements and the expected result given the sample.





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Problems with ProgressBar Binding when Value is non zero

I believe if you are going to be changing the value, you need to set it to determinate by flagging IsIndeterminate = "false";


Problems with ProgressBar Binding when Value is non zero

Thanks for your reply tsw, but the default value for IsIndeterminate is already false, so adding it to the XAML doesn't change the behaviour of the ProgressBar.

Default parameter value to allow all record to show

I have query that uses a parameter for Last Name in the where clause. I would like to figure out how to get the report to pull all the names when the user clicks on the report for first time, and then allow user to specify specific records afterwards.


Thanks,


Amol


Default parameter value to allow all record to show

Katherine,


Thank you for your help. I created the new data set and followed the above steps but still not able to view the report with default values. I look forward to hearing from you. Thanks.


Regards,


Amol


Sharepoint blog, multiple posts

I'm having problems with my sharepoint blog. When I try to click one post, all of my other posts seems to show as well. I also have some issues with the comment section part. If you have any questions or concerns, do let me know. :) Thanks! Cheers!


Vectors, Lists, Sets and other containers

I am interest in finding out if C# has a library like the Standard Template Library in C++.


I love the flexibility of the STL and I am sure C# has one similar too, so... any help would be very much appreciated.


TIA




Worry is a misuse of imagination :)


How do I Join Calendar table with other tables with sparse dates

I would try for a moment to forget about Calendar table and write normal JOINS for other tables as you would do to get information from them. Put that select statement into cte (derived table) and then from the Calendar table LEFT JOIN with that derived table or cte.


For every expert, there is an equal and opposite expert. - Becker's Law





My blog




My TechNet articles


Unlock a stored procedure

hi to all,


we get a stored procedure from network but it is locked and we can only exec with parameters,


its possible to see code?


thanks.


Unlock a stored procedure

Hi,


Try to run below command by providing SP name. This will return the complete code of Stored procedure.


EXEC sp_helptext '[dbo].[SP_NAME]'




Thanks Shiven:) If Answer is Helpful, Please Vote


Unlock a stored procedure


we get a stored procedure from network but it is locked



Hello Seyed,


Locked? I guess you mean the SP is shown up in SSMS object explorer with a lock icon? This means the stored procedure is encrypted and there is no official way/tool to decrypt the SP. You have to ask the developer of the SP to give you the code.




Olaf Helper


[ Blog] [ Xing] [ MVP]

I chose the WRONG Developer License option when installing FREE Visual Studio 2012

Hi


You do not reinstall Windows 8 and Visual Studio to update visual studio 2012 to the App store license.


See the link to know how to get developer license

by VS or command prompt:


http://msdn.microsoft.com/en-us/library/windows/apps/hh974578.aspx


Best Wishes!






We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



Question regarding the labels in horizontal axis

I need to display labels as (year1,year2....year13) on horizontal axis.. I have sorted it by asc, but when it is displayed ,it is shown as year1,year10,year11,year12,year13,year2,year3,....year9).


Please help me to fix this issue.


Question regarding the labels in horizontal axis

Actually I have fixed my issue, related to lables in horizontal axis.


But have one more issue. I should make my label sto be displayed from zero on horizontal axis. Please help me to fix this issue.


Question regarding the labels in horizontal axis

Hi Revathikartik,


If I understand correctly, you want to display the labels from the position 0 on horizontal axis. In this scenario, we can set the Side margins property to disable the side margins in Horizontal Axis Peoperties.


The screenshot is for your reference:



Besides, glad to hear that the former issue is resolved. If you would like to, you can post a reply to share your solution. That way, other community members could benefit from your sharing. The following link can also fix your former issue, please see:

http://social.technet.microsoft.com/Forums/en-US/d6a7198e-e2ac-4d5c-a2a8-5762f60cd497/display-months-in-order


If you have any more questions, please feel free to ask.


Thanks,

Katherine Xiong




Katherine Xiong

TechNet Community Support



Publishing reporting services tempate to SharePoint 2013

Hi David,


Base on your description, you can deploy SQL Server Reporting Services report to app server application without any problems, the issue is that cannot deploy reports to web front end application with the error Access Denied. In this case, please ensure that you have installed Reporting Services Add-in for SharePoint success and created Reporting Services application success. Then please check whether you have sufficient permission on that application, here is a similar issue for your reference.

http://www.windows-tech.info/15/305cd310c27ecf3b.php


Regards,

Charlie Liao


If you have any feedback on our support, please click here.




Charlie Liao

TechNet Community Support



How to show list item limit on top right of the list?

Hi,


As we know that by default a list page is limit to 30 items and we can extended it but is it possible to show it on top right of the list?


Any idea with example would be appreciated please.


How to show list item limit on top right of the list?

If you're extending beyond that limit, then it technically does show via the pagination. It will show the item number. So if you really needed that, then you could do jQuery to find that, parse the numbers and then display the result in a div.


Andy Wessendorf SharePoint Developer II | Rackspace andy.wessendorf@rackspace.com


How to show list item limit on top right of the list?

thanks for reply but the solution is very general, no example.


Still waiting for reply with a solution or example.


I want to show pagination on top left of the list.


Survey Responses Missing

I have been

doing surveys in Sharepoint for years and I understand the way that the number

taken can be different than the number visible if people do not complete the

survey or don't click finish or delete their survey.<o:p></o:p>


In my case

the first 14 surveys taken have disappeared and I can't see there responses. I

know that the odds of the first 14 people incorrectly taking the survey while

the rest are all showing up fine are slim when the people taking it all have done

so several times before. When I ask someone that is missing from the list to

try and take the survey it says they cannot responded again to the survey. Their

names do not show up in all responses so they can edit and finish the survey if

they did not complete it.<o:p></o:p>


Any idea

where they are or how I can get them back or see them?<o:p></o:p>


I do have

branching on the survey but in looking at the results no one else had issues

after the first 14 surveys taken regardless of the way the branching took them.


Thanks,


<o:p></o:p>



DataGridViewComboBoxColumn cell value returning null

I am trying to get a value from a DataGridViewComboBoxColumn cell that is named "Item".


When I run the program and make a selection from the combobox, string itemValue always returns "";


I am also getting an error on the line



cmbItems.ValueMember = productNames.ToString();

What am I doing wrong in trying to get the value?


My Code:




// set values to combobox column cells in datagridview
DataGridViewComboBoxColumn cmbItems = (DataGridViewComboBoxColumn)GridSellProducts.Columns["Item"];

cmbItems.DataSource = productNames;

cmbItems.DisplayMember = cmbItems.ValueMember;
cmbItems.ValueMember = productNames.ToString();
cmbItems.AutoComplete = true;

GridSellProducts.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(GridSellProducts_EditingControlShowing);



and



private void LastColumnComboSelectionChanged(object sender, EventArgs e)
{
string itemValue = GridSellProducts.Rows[GridSellProducts.CurrentCell.RowIndex].Cells["Item"].FormattedValue.ToString();

// get item price
foreach (var item in itemListing)
{
if (item.name == itemValue)
{
unitPrice = item.selling;
break;
}
}
}

private void GridSellProducts_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (GridSellProducts.CurrentCell.ColumnIndex == 0 && e.Control is ComboBox)
{
ComboBox comboBox = e.Control as ComboBox;
comboBox.SelectedIndexChanged += LastColumnComboSelectionChanged;
}
}


Why can't I get the selected cell value?


productNames is a list of string item names.



DataGridViewComboBoxColumn cell value returning null

If productNames is just a List<string> then you don't need to set the ValueMember and DisplayMember. The combo box will implicitly call ToString() on the items if you do not supply them.


The ValueMember and DisplayMember are used when you are binding to objects with properties and you need to specify which property should be shown and which should be the value. For instance, if you had a collection of Person objects the Display member might be "FullName" and the value member might be "PersonId".


When you are setting the value member to productNames.ToString() you are telling it to use the System.Collections.Generic.List[System.String] property of productNames. Of course, productNames has no such property.




Bob - www.crowcoder.com


DataGridViewComboBoxColumn cell value returning null

Instead of FormattedValue, what is Value?


Are you even handling the CellFormatting event?




Bob - www.crowcoder.com


DataGridViewComboBoxColumn cell value returning null

Hi,


I am new to using datagrid views so I have been learning from just a few days ago.


Value instead of Formatted Value is still returning null.





DataGridViewComboBoxColumn cell value returning null

Hi kkjay,


You can try this code:



string itemValue = GridSellProducts.Rows[GridSellProducts.CurrentCell.RowIndex].Cells["Item"].Value;







We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.



Separate an Image into areas is it possible ?

Hi ,


I'm building a Metro UI c# app Windows 8.


I'm calling a webservice where I must download a picture and display it in my app.


I don't have a problem with that so I'm not asking for that code.


The scenario is as follows.


I must be able when I click on the picture in certain areas to display some information. Let's say that I have a spare part when I click in a specific are of the image I want to display the name of part. When I click in a different area inside the image to display something else(I know how to display things so let's not focus in there).


How do I do that (Kind like we have in the HTML areas)?


Do I need to use an image control load in there the downloaded picture and then what ?


I 'm ok as far it concerns the code part ,donwload and display in an Image control.


After that ? How can I implement the click part? Click in certain area (x,y) and display this and click in other area from inside the Image and display something different ?


Appreciate any guidance on this.


thank you



Separate an Image into areas is it possible ?

Hi, zakkar


You can define a usercontrol and override its OnPointerPressed

event. See some codes below:


User control in XAML:



<UserControl
x:Class="Combobox.MyUserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Combobox"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<Grid>
<Grid>
<Image Source="Assets/Logo.png" IsHitTestVisible="True" Stretch="Fill"/>
</Grid>
</Grid>
</UserControl>

MyUserControl1.cs:



public sealed partial class MyUserControl1 : UserControl
{
public MyUserControl1()
{
this.InitializeComponent();
}

protected override void OnPointerPressed(PointerRoutedEventArgs e)
{
Image image = e.OriginalSource as Image;
Debug.WriteLine("Current Point:X:{0} Y:{1}",
e.GetCurrentPoint(image).Position.X,
e.GetCurrentPoint(image).Position.Y);
// ...
base.OnPointerPressed(e);
}

}

Use the MyUserControl1 in MainPage:



<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<local:MyUserControl1/>
</Grid>

Best Wishes!






We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



I chose the WRONG Developer License option when installing FREE Visual Studio 2012

Hi,


The forum supports VS Setup and Installation. Your issue isn't related to the forum.


I will move it to the related forum for better support.


Regards.




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


Power View on SSAS OLAP

Hi Christophe,


As per my understanding, SSAS is not support true geography data types. We can get the geography data types from SQL and the using other SSAS to color the map. More detail information, you can refer to the blog below:

http://blogs.technet.com/b/andrew/archive/2010/09/20/a-worked-example-of-using-spatial-and-olap-data-in-reporting-services.aspx


Hope this helps.


Regards,

Alisa Tang




Alisa Tang

TechNet Community Support



Migrating VB6 SOAP client application to .NET 4.0

Error Value cannot be null. Parameter name:solutionDirectory

I just got started using the kinect and was trying to just run the sample code and I keep getting this error. I'm guessing that I need to change or set a path directory or something?

Error Value cannot be null. Parameter name:solutionDirectory

If you do not show us your code (the whole segment) and wich line throws the exception, we can only guess.


This sounds like the Function checks the paramters before execution and tells you that one Argument that should not be null, is null (nothing in VB). Hence it throws a ArgumentNull Exception so you can fix that.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


Error Value cannot be null. Parameter name:solutionDirectory

That is not C# Code. That is C++ Code. And it looks like native C++, not C++ .Net.


This is C# forum, we cannot really help with this problem.


Could a moderator or admin please move this into the fitting Forum for native C++ development or Kinekt devleopment. Or at least give a link to those Forums?


P.S.: Please use Codeblocks for posting Code. reading such long code without Syntax highlighting is quite problematic.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


Error Value cannot be null. Parameter name:solutionDirectory

Hi Zippidydooda,


I think this thread is specific to C++ forum. This form is to discuss problems about C# development. Please post a new thread on that forum for more effective response. http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vcgeneral


Thank you for your understanding.


Best Regards,




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


Draw same bitmap multiple times

Hello JeryP,


If you can use static or dynamic path than there is to put multiple image control in view using design. And another use using code behind. So you can use for create object of image than you give source to image. Than you need to put this image object inside any parent control.


Draw same bitmap multiple times

Thats true. But the problem is if image are not in only one canvas. Or it is anywhere in page. Then?

Draw same bitmap multiple times

I want multiple bitmaps drawn in different positions in the same Canvas, without using multiple Image Objects.


I am drawing music notation, where some items (like a quarter note) may appear dozens of times. I can create an array of Images, each with the same ImageSource, but I wondered if there is a way without using dozens of Image controls.


JeryP...


Draw same bitmap multiple times

Please see my reply to Khant.


Draw same bitmap multiple times

Please see my reply to Khant.


Draw same bitmap multiple times

What's wrong with dozens of Image controls? Performance should not be a problem. I don't think there is a way around it. For an image to be rendered you need an Image control. Another way would be to use DirectX to draw the images manually but that probably isn't necessary.

Draw same bitmap multiple times

I just wanted to be sure that you can't draw a bitmap without it being in a control. After all, it is a lot more code and I'm used to doing it the easy way in GDI+ and Direct2D.


Thanks very much for all the replies...


Problem to handle with Gridview

Hi,

I am running VS 2013 against Access 2013 DB. But due to that I'm calling this event


...
BindData();
...

private void BindData()
{
int iteid;
bool b = int.TryParse(lb_iteid.Text, out iteid);
DataTable table = new DataTable();
using (OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Database Password=?????;Data Source=C:\inetpub\VS2012\DB1.accdb"))
{
string sql = "Select * from ite_tab2 where ite_id=@ite_id";
using (OleDbCommand cmd = new OleDbCommand(sql, conn))
{
//using (SqlDataAdapter ad = new SqlDataAdapter(cmd))
using (OleDbDataAdapter ad = new OleDbDataAdapter(cmd))
{
cmd.Parameters.Add("@ite_id", OleDbType.Integer).Value = iteid;
ad.Fill(table);
}
}
}
GridView1.DataSource = table;
GridView1.DataBind();
}



when saving the record, I've got this exception. why?

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).System.Data



Many Thanks & Best Regards, Hua Min


Retrieve API Data by Using C#

Goal:

Using C# code to retrieve data from API and insert it into a SQL server's table.


Problem:

What C# source code / syntax do you suggest me to use? Is it efficient to use LinQ? What syntax do I need to retrieve the data from API?


Information:

*The computers version is SQL 2008 R2 standard edition.

*I'm using VS 2008

*The URL address contains login and password.

*If you save the document by pasting the URL address, it will ask if you want to save it and the format will be xml.

*No usage of third person application or add in application for instance Resharper etc.


Retrieve API Data by Using C#

API stands for Application Programming Interface. Wich means there is not only more then one, there are several different kinds of API's.


We need to know wich API you are even talking about. We also need to know if this is a API written in .NET or if it has any .NET wrapper.


Also we generalyl do not follow links from new members. If you have code, please use Codeblocks for it.




Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.


Retrieve API Data by Using C#

Thank you for your help. In this context I have the link "http://api.arbetsformedlingen.se/platsannons/matchning?nyckelord=bagare"


How should I retrieve, download, process and then apply it in a database?


Flipview virtualization

I have a FlipView with VirtualizingStackPanel as its ItemsPanel and about 5 items in its ItemsSource. I am using this Flipview to create an automatically transitioninig Live Tile effect. So, I end up using about 10-15 of these flipviews in my page. Each of these have a fixed height and width. Would performance be an issue as a result of using these multiple flipviews?

report viewer timeout

Hello,


using ssrs 2008.

The ssrs report takes over 20 mins to populate. This works fine if it is run from the server i.e. http://reportserverName/reports/reportName...


In my winform I am using a report viewer control which calls the report. But in the report viewer if any report runs more than 10 mins then it shows timeout.

The report on the server has the option "Do not timeout report" selected

Question:


Is there a way to increase the timeout in the report viewer control?

Thanks


SSRS 2012 Viewer scollbar issue in Chrome

Hello there,


My issue is ssrs report viewer scroll bar not functioning properly in Chrome browser.


In my web application I have added ReportViewer control in aspx page. All reports are working Fine in other browser but in Chrome the scroll bar is scrolling on its own with mouse moving. This is happen only for few latest version of chrome.


I have tested it for chrome v11 its working fine but in v31 mouse scroll bar is sticky with moues move.


Please help me to get out from this issue,


thanks,


Avya


SSRS 2012 Viewer scollbar issue in Chrome

Hi



Wednesday, November 27, 2013

Left Join Issue


create table T (sid1 int,sub char(2))
insert into t(Sid1,sub)
values
(201 ,'T1'),(201 ,'T2'),(201,'T5'),
(202 ,'T2'),(202 , 'T3'),(203 , 'T4')

create table T2 (sub char(2))
insert into t2(sub)
values ('T1'),('T2'),( 'T3'),('T4'),('T5')


create function fncT2 (@SID int)
RETURNS TABLE
AS
RETURN
(select T2.Sub,T.Sid1 from T2 left outer join T on T2.Sub=T.Sub and T.Sid1=@sid)

;with Temp as
(select distinct T.sid1 from T)
select B.* from Temp cross apply fncT2(sid1 ) B





Hope it Helps!!


Left Join Issue

Try this.



Declare @TableA table(SID int,Sub varchar(2));
Declare @TableB table(Sub varchar(2));
Insert into @TableA Values(201,'T1')
Insert into @TableA Values(201,'T2')
Insert into @TableA Values(201,'T5')
Insert into @TableA Values(202,'T2')
Insert into @TableA Values(202,'T3')
Insert into @TableA Values(203,'T4')
Insert into @TableB Values('T1')
Insert into @TableB Values('T2')
Insert into @TableB Values('T3')
Insert into @TableB Values('T4')
Insert into @TableB Values('T5')

;With
CTE_Cjoin
as
(
select * from
(select distinct SID from @TableA) Dis
Cross Join
@TableB

)
select C.SUB,A.SID from CTE_Cjoin C
Left join @TableA A on C.Sub=A.Sub and C.SID=A.SID
Order by C.SID,C.SUB





Vinay Valeti| If you think my suggestion is useful, please rate it as helpful. If it has helped you to resolve the problem, please Mark it as Answer


Language selection at runtime by the App (Localization support in Windows Store App)

Anyone faced similar issue?

Privacy Policy - acceptable ways to add it to your store app?

Ok, I'm new here so forgive me if I make break any rules!!


My app got rejected because I didn't include a privacy policy IN the app (I provided a URL link fine) and I got the 4.1 message saying I needed to add it to the Windows Charm, but my question is:


Does it HAVE to be in the Charm pane? Could I add a form that shows up when the browser is opened first time, and add a check box that will stop it showing up in future? Could I just add a button that says "Privacy Policy" and opens a new form that has all the relevant information on?


Oh, and for reference, it's a simple web browser done in C# & XAML and created in Visual Studio 2012.


Any non-judgemental help is appreciated because I've looked at code templates to add the Policy and they all look complicated (but one of my peers told me it can be done in 'about' 4 lines of code - which for the life of me I can't find)


Pete (Newbie developer)


Privacy Policy - acceptable ways to add it to your store app?

I let it generate the 'stubs' it needed but it's throwing up the following errors:


Error 1 Type 'WindowsBrowser.MainPage' already defines a member called 'onCommandsRequested' with the same parameter typesC:\Users\Pete\Downloads\WindowsBrowser\WindowsBrowser\WindowsBrowser\WindowsBrowser\MainPage.xaml.cs64 14 WindowsBrowser


Error 2 Type 'WindowsBrowser.MainPage' already defines a member called 'SettingCharmManager_CommandsRequested' with the same parameter typesC:\Users\Pete\Downloads\WindowsBrowser\WindowsBrowser\WindowsBrowser\WindowsBrowser\MainPage.xaml.cs78 21 WindowsBrowser



Any help appreciated, pointing out my errors and mistakes helps me learn :)


Privacy Policy - acceptable ways to add it to your store app?

Did you copy/paste an existing method and scrub out the implementation? This error suggests you've got the same name twice. You should put the code above into the method that was already existing. It will add a link onto the settings charm below whatever else you are adding.


KeepMyIdentities, Your Key to Password Security. Available now on the Windows Store: http://apps.microsoft.com/webpdp/en-US/app/keepmyidentities/61a9f340-97ac-4666-beab-39f9246cb6fa


Regualar Expression for Message Sent Conformation in COM PORT

what is regular expression for this string:

"REL LOCK OPEN\r\n+CMGS: 67\r\n\r\nOK\r\n"

Plz Some one Help me it's Very urgent.

Problem to save picture file

Hi,

when saving the picture file to Access DB, like


fl_nm = "c:\\inetpub\\VS2012\\App17\\" + lb_ph_file2.Text;
cmd = new OleDbCommand("update ite_tab set photo_file=@image where ite_abbr=@abbr", conn);

cmd.Parameters.Add("@abbr", OleDbType.VarChar).Value = tb_iteabbr.Text.Trim();
cmd.Parameters.Add("@image", OleDbType.Binary).Value = ImageToStream(fl_nm);
if (cmd.ExecuteNonQuery() >= 1)
...

private byte[] ImageToStream(string fileName)
{
Bitmap image = new Bitmap(fileName);
MemoryStream stream = new MemoryStream();
image.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp);
return stream.ToArray();
}



I get this exception. why?

An UPDATE or DELETE query cannot contain a multi-valued field.Microsoft Access Database Engine



Many Thanks & Best Regards, Hua Min


Left Join Issue

Try this,



declare @table1 table(Sid int, SUb char(2))
insert into @table1 values(201,'T1')
insert into @table1 values(201,'T2')
insert into @table1 values(201,'T5')
insert into @table1 values(202,'T2')
insert into @table1 values(202,'T3')
insert into @table1 values(203,'T4')
-------------------------------
declare @table2 table(Subs char(2))
insert into @table2 values('T1')
insert into @table2 values('T2')
insert into @table2 values('T3')
insert into @table2 values('T4')
insert into @table2 values('T5')
-------------------------------
;with cte_cross as (
select distinct a.Sid,b.Subs from @table1 a cross join @table2 b
),cte_validation as (
select Subs, case
when not exists(select * from @table1 a where a.Sid = c.Sid and a.Sub = c.Subs) then null
else Sid end newSid
from cte_cross c
)
select * from cte_validation





Regards, RSingh


Adding a new project to a Windows 8 app with VS 2013

Dear forum,


After too long a break, I'm going back to updating a Windows 8 app I published a while back. I've recently upgraded to Windows 8.1 and VS 2013 Pro. I have a list of best practices I'm finally starting to implement, one of which is hosting my code on Visual Studio Online. So far, the integration with VS 2013 is very nice. Another best practice is that I'm factoring out a lot of view model code into its own library, which is long overdue. However, when I add a new project in VS 2013, it won't let me say that the project should be a Windows 8 project. I didn't think this would be a problem, but now I can't reference the new project from the existing one (I get a delightfully helpful "Unable to add reference to project" error). I don't want to retarget it, because I want users who are still on Win8 to be able to get the updates. But I also want to keep using VS2013, especially for VS Online. What should I do? Is the target mismatch the root cause? Can I get the new library to work with Windows 8?




KeepMyIdentities, Your Key to Password Security. Available now on the Windows Store: http://apps.microsoft.com/webpdp/en-US/app/keepmyidentities/61a9f340-97ac-4666-beab-39f9246cb6fa


Password Login Help

I am using visual studio express 2012 and I am developing a program. I need to be able to login from text boxes that read data against a text file. I have a text file named PasswordFile its formated like:


Able, AblePass, Apples, 1/1/01

Babson, BabsonPass, Bubbles, 2/2/02

Baker, BakerPass, Babboon, 3/3/03

Charlie, CharliePass, Catman99, 4/4/04


The username for Baker is BakerPass and the password is Babboon for example.


I need to read from two text boxes from a login form called txtUsername and txtPassword

I have a button called btnSubmit that when clicked checks data from these two text boxes against the text file from the second and third column of the text file. Any ideas?


Password Login Help

Where (on the user's computer) is the text file placed? So far that doesn't sound to be especially secure.


At any rate though, you might consider using a TextFieldParser to read your CSV file, as explained here .




Please call me Frank :)



Password Login Help

This is just a mach design. The text fie is located in C:\PasswordFile

I want it to open a subsequent form if the user Id and password for that user matches from the text boxes.


Thanks for the quick reply.


Password Login Help


This is just a mach design. The text fie is located in C:\PasswordFile

I want it to open a subsequent form if the user Id and password for that user matches from the text boxes.


Thanks for the quick reply.



You might want to reconsider the location of the file, but that's up to you.


Use the TextFieldParser (set the delimiter to a comma), then read the file. As an example:




Private Sub ReadInputFile(ByVal textFilePath As String)
If My.Computer.FileSystem.FileExists(textFilePath) Then
Using tfp As New Microsoft.VisualBasic.FileIO.TextFieldParser(textFilePath)
With tfp
.TextFieldType = FileIO.FieldType.Delimited
.Delimiters = New String() {","}
' Set the following to true if you have fields
' which are enclosed in quotation marks:
.HasFieldsEnclosedInQuotes = False
End With
Dim currentLineOfText() As String
While Not tfp.EndOfData
Try
currentLineOfText = tfp.ReadFields()
Stop
Catch ex As Exception
MessageBox.Show("An error reading the input file has occurred:" & vbCrLf & vbCrLf & _
ex.Message, "I/O Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End While
End Using
Else
MessageBox.Show("The input text file could not be located.", "File Not Found", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub




The per line, test for the fields to see if you have a match.


Please call me Frank :)


To set a couple events for all label in a form?

I want to use MouseEnter and MouseLeave events for Labels in a form as collectively.I have below but How I call event in For Next loop?



For Each ctl As Control In Me.Controls
If (ctl.Name.StartsWith("Label")) AndAlso (TypeOf ctl Is Label) Then
Dim lbl As Label = DirectCast(ctl, Label)
End If
Next ctl


Pass dyanamic columns with , seprated in group by into Linq

hi,


can you please describe your problem little detail , so we can help you on it. what you want to achieve?


Thank You,


Sammani


Help Please?!

So I'm very new to C++. Actually this is my first program. After I right the code, I don't know how to run the program.. Can anybody help. I'm aware this is probably a dumb question but I need help.

Help Please?!

On the menu at the top of Visual Studio, under "Debug" you will find "Start Debugging" and "Start Without Debugging". If your program has built successfully, either of these options will run it. The same options are also available via the hotkeys F5 and Ctrl-F5, and possibly also as toolbar buttons depending on your setup.


Oh, and by the way, this is a C# forum , not C++.

Return Recordset for Child Tables with a TVP

Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible. This is minimal polite behavior on SQL forums. Now we have do your job for you! >> I have created a Parent [sic] table (User_Accounts) and I have two child [sic] tables (User_Skills and User_Locations) << The correct terms are Referenced and referencing tables in RDBMS. The ASCII pictures you did post are wrong. You believe Kabbalah magic! That is how you can have a magical “id” that changes from a user to a skill to a location, to a squid to an automobile, etc. CREATE TABLE Users (user_id CHAR(10) NOT NULL PRIMARY KEY, first_name VARCHAR(20) NOT NULL, last_name VARCHAR(20) NOT NULL); Did you notice that there is a key? Since it is an identifier, it is a string; we use numeric data for computations. That the name columns are post office standards? CREATE TABLE User_Skills (dot_code CHAR(9) NOT NULL, user_id CHAR(10) NOT NULL REFERENCES Users(user_id), PRIMARY KEY (dot_code, user_id)); The DOT codes are the dictionary of occupational titles. This is the industry standard (http://www.occupationalinfo.org/ ). We do not want or need that silly Kabbalah number! CREATE TABLE User_Locations (san CHAR(10) NOT NULL, user_id CHAR(10) NOT NULL REFERENCES Users(user_id), PRIMARY KEY (san, user_id)); There is also a Standard Address Number (SAN) in many industries and we have UPS, FedEx and other address system. If this is a physical location, then use HTM numbers. >> What I want is to return a record [sic: rows are not records] set that has searches against the child [sic] tables. However there is no limit to the amount of search criteria for the skill and locations as long as it matches any of those it should return the users first/last name and user_id. >> In C# I've tried to use TVP (which is selected using a checkboxlist) to send through the array of DOTs and SANs but I am not sure what I do with it now? << This is SQL, so we do not care about C# or any other presentation layers. 1) The dangerous, slow kludge is to use dynamic SQL and admit that any random future user is a better programmer than you are. It is used by Newbies who do not understand SQL or even what a compiled language is. A string is a string; it is a scalar value like any other parameter; it is not code. Again, this is not just an SQL problem; this is a basic misunderstanding of programming principles. 2) Passing a list of parameters to a stored procedure can be done by putting them into a string with a separator. This also stinks; for the details, read: http://www.simple-talk.com/sql/learn-sql-server/values()-and-long-parameter-lists/ http://www.simple-talk.com/sql/learn-sql-server/values()-and-long-parameter-lists---part-ii/ Do this with a long parameter list. You can pass up to 2000+ parameters in T-SQL, which is more than you probably will ever need. The compiler will do all that error checking that the query version and the procedural code simply do not have unless you write a full parser with the standard error codes. You can now pass local variables to your procedure; you can pass other data types and get automatic conversions, etc. In short, this is just good software engineering.


--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking in Sets / Trees and Hierarchies in SQL