OnCallBI-DBA's Q&A profile
Visual Basic I need to add Time to DB not DateTime
Hi, In SQLServer the table contain Filed type is DateTime to store time. when I tryed to add time to this field the dataset convert my time (HH:MM for example) to DataTime (yyyy-mm-dd HH:MM:SS for example). What I want is to store pure time (HH:MM) only not date and time. Regards Hi, Best i can think of then is to save as a String length = 4 or 5 and validate the results to be written to the field using something like:>> Private Sub Button1_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click GetTime() End Sub Private Sub GetTime() Dim myString As String myString = InputBox("Please input ...Show All
SQL Server Smart Aggregation
I'm having problems implementing the following in reporting services 2005. My hierarchy looks like this (just to illustrate the problem...): University->Student->Exam My query returns the following fields: University,Student,StudentPayment,ExamName,ExamScore I need to create a report that will show the hierarchy and to smartly aggregate the StudentPayment to both the Student and the University levels. The problem is that the StudentPayment field is being multiplied by the number of exams in the upper level aggregation. If only I could set the granularity level of the StudentPayment measurement... Note that I don't have access to the query, so I can't change anything on that front. Thanks, Efi ...Show All
Windows Forms How to make a licience expire?
Hi, I have developed a software but I need help on how to issue licences that expire after a given period of time. What is the best way to licence out a software and make it expire and unusable after an year Thank you Look at the Shareware Starter Kit Example ... it might have what you are looking for. It might give you some ideas on implementation. ...Show All
SQL Server Convert columnar data into rows
I have a table of data that needs to be converted to rows but with a way to identify for each row the column the row value came from. Here's an example table: Employee FED MEDI SOCSEC 123 $100 $25 $70 234 $242 $54 $90 345 $75 $10 $55 Here's the format the data needs to be in after it's converted. Employee CodeType Code Amount 123 T FED $ 100 123 T MEDI $ 25 123 T SOCSEC $ 70 234 T FED $ 242 234 T MEDI $ 54 234 T SOCSEC $ 90 3 ...Show All
.NET Development How can access to LPT1 directly
hi I need to send data directly to printer port.So I want to know what is similar command for this in VB6 : open "lpt1:" for output as #1 Hi. I tried this : Hn = CreateFile("lpt1:", &H40000000, 0, Nothing, 2, &H80 Or &H40000000, Nothing) but it doesn't work.Hn will be -1 ...Show All
Visual Studio Express Editions Stuck in loop; newbie need help
Hi All ! The following code seems to stuck in loop. Any idea why Function koe( ByVal u As Short ) As Boolean Dim z As Integer = 0 Do My .Application.DoEvents() Out(&H378S, 1) For z = 1 To 200 z += 1 Next Out(&H378S, 0) 'Stop For z = z To 1000 z += 1 Next 'Acc = 0 z = 0 Out(&H378S, 0) Loop While u = 1 'Acc = 0 z = 0 Out(&H378S, 0) End Function The code comes out of do loop when u = 1, but it still keeps doing output to LPT Thanks in advance Chopa Complete agree with you stephen. Putting a debugger and stepping through the code looking at the watch windows to see ...Show All
Visual Studio 2008 (Pre-release) How to populate a WPF TreeView node from a datasource?
I'm having a question about populating a treeview control node. <TreeView> <TreeViewItem Header="Node1"> <TreeViewItem Header="Subnode1"/> ... <TreeViewItem Header="Subnode10"/> </TreeViewItem> <TreeViewItem Header="Node2"> <TreeViewItem Header="Subnode1"/> ... <TreeViewItem Header="Subnode10"/> </TreeViewItem> </TreeView> Now, my problem is that I have a observableCollection that holds infrmation for subnodes that go into "Node1", and another observableCollection that holds information about subnodes that go into "Node2". Until runtime, I don't know which ...Show All
Windows Forms Distribute framework
I'm developing my application under framework 2.0 right now. And it might be possible for the framework 3.0 to release when the application is distributed. My questions are: 1. I check the framework 2.0 as a prerequisite in the setup module. I wonder what's going to happen if the target machine has the framework 3.0 installed already. 2. Is that ok to distribute framework 3.0 with my application Will the application works ok under framework 3.0 3. Can I check framework 3.0 as a prerequisite in order to distribute framework 3.0 package Thanks 1. The 3.0 Frameworks includes 2.0, so if you select 2.0 as a pre-requisite and you go to install on a machine that has 3.0, the bootstrapper will det ...Show All
Windows Live Developer Forums Does VE mess up PNG alpha for IE7?
I've been playing with a custom tile set generated via map cruncher. The tiles are generated from an image with an alpha channel of about 170 on coloured regions, and full transparency everywhere else. When the tiles are generated and loaded in firefox they look great... exactly as intended. IE6 used to be hideous (last month) and now seems to have the transparency handled, but no alpha. I was using Lewis Harvey's fix, but it no longer seems to be required IE7 also has no alpha on the coloured regions, either, which suprises me. I thought IE7 was supposed to support PNG alpha now. Anyone have any insight or hacks that might make IE7 work as nicely as firefox Thanks, Greg IE7 supports alpha channel for ...Show All
SQL Server Unable to read local eventlog (the parameter is incorrect)
In trying to setup alerts and activating them, an error occurs in the sql agent log of Unable to read local eventlog (the parameter is incorrect) The full messages from the Windows NT Logs shows: Event Type: Error Event Source: SQLSERVERAGENT Event Category: Alert Engine Event ID: 318 Date: 03.11.2005 Time: 17:14:47 User: N/A Computer: RESYSHADOW Description: Unable to read local eventlog (reason: The parameter is incorrect) Does anyone know what could be causing this. I have tried it on Windows XP SP2 with local Admin account and on Windows Server 2003 with Domain Administrator Account and the SQL2005 Server is RTM with the same results. Even I am getting the same error in the application event ...Show All
.NET Development Build XML From XSD
I have a design question. I have a requirement to receive an xml document (with an referenced schema), and when done processing the document, add a few additional optional elements to this xml document and send it back to the sender. The optional elements that need to be added are known (communicated by the customer - and hardcoded in the app), but I'll when I add them, I'll need to read the schema to make sure that they are inserted in the right place in the xml document. These fields are optional in the schema, but will be required to be send in the reply. What is the best way to approach this How do you modify the XML you get If you are using System.Xml.XmlDocument (and .NET 2.0) then you hav ...Show All
Visual Studio Team System Upgrade path from MSDN Professional
I have an existing MSDN Professional subscription with about 18 months remaining, primarily taken out to give access tom Visual Studio Professional. I would like to upgrade to use the Team System, but cannot find any information at all about an upgrade path from MSDN Professional to MSDN Premium (which appears to be what I need to use the Team System). Is this really correct Do I have to throw out my existing MSDN Professional subscription and start again with a new Premium subscription just to get access to Team System Or do I have to purchase Team System separately. There seems to be a lot of "help" about version, upgrades etc on the site, but none of it really seems to help me identify what my options are. This is really, re ...Show All
Internet Explorer Development How to catch the change of toolbar icons size? How to track the state of IE window?
I'm working on custom IE toolbar (VC++ 6.0). It is necessary to adjust the size of my toolbar's buttons accordingly to the state of the standard toolbar icons size (when user changes property "Use Large Icons" buttons in my toolbar have to be sized appropriately). So, how to catch the change of toolbar icons size Second question is how to catch changing state of IE window - activated/deactivated Can anyone provide me with good advice Does DWebBrowserEvents2 help me TIA Hi, I do very little C++ codeing and have little experience using it. What about bitblt called in your toolbar resize event I assume you are using a rebar for your toolbar container Or am I missing something here Do you want to know when ...Show All
SQL Server Upgrade SQL Express SP1 to SP2
I have SQL Express SP1 installed for some instances. I would like to upgrade all the instances to SP2 at once in silent mode, without specifying the product selection and other options. Is this possible If so, how Thanks in advance. Peter Hi Peter, The downloadable package for SQL Express can only upgrade one instance at a time, upgrade multiple instances you would have to run the package multiple times. Additionally, to get quite mode, you need to use the command line, but the command line will be different for each instance. At a minimum the command line must specify the instance name, further, if each instance does not have identical features installed, you would have to specify the correct set o ...Show All
Visual Studio Trying to create a NEW DATABASE Project - but the word "database" doesn't show
Hello and Thank you for you support Within Visual Studio 2005 IDE, I've been trying to create a new VB.NET "database project", but when I expand the Visual Basic node, the only items that show up are ==> Windows and the Starter Kit items. I don't see anything for Database How can I create a new "Database Project" when I cannot see the database item showing up in my "new project" list Is it a configuration setting I am using the "General Configuation Settings", and changed it to Visual Basic Configuration setting , but that didn't make any difference. Please and thank you for any advice on this. Donna ! Thanks I am using the Visual Stu ...Show All
