OsBr's Q&A profile
SQL Server Standby, this is a test post, thanks for your patience
I just have to try this. ...Show All
.NET Development ConfigurationErrorsException on Saving
I have a created a custom section, that contains user settings. These settings are in a file located by a user defined location. I open this section using the "OpenMappedExeConfiguration" of the configuration manager. Everything works fine, until I open a second instance of my program and attempt to save changes. Since the second instance utilizes the same config file, I am getting a "ConfigurationErrorsException" . -The configuration file has been changed by another program. (C:\Documents and Settings\....config) How can I overcome this problem Will the configurationmanager work in this senerio Is there a way to merge changes ps. not that it should matter but this is a winforms app. Thanks for ...Show All
.NET Development Retrieving custom attributes of the assembly at designtime and runtime
Hi. I'm making a user control (lets say MyUserControl), that uses license provider and license classes to determine if developer has acquired a license key for the control. The user control is in the separate project. I like to add my custom control to a Form1. In the project that defines and shows Form1, I add a custom attribute to the AssemblyInfo.cs, that defines the lisenceKey: [assembly: MyUserControlLicenseKey("12345")] How can I retrieve the lisence key from AssemblyInfo at both design and runtime I have tried to retrieve it by using the instance parameter of the GetLicense method of the license provider, but the parameter always has a value null . public override License GetLicense(LicenseContext context, Type type, objec ...Show All
Visual C++ MFC: How to wait for end of CWinThread based threads?
I have my thread function which was created using CWinThread T = AfxBeginThread(myFunc,NULL); My question is how do I wait for the end of this thread Like in win32 there was a WaitForSingleObject function. And another thing, do I need to delete T after I finish using the thread Thanks :) spree wrote: I have my thread function which was created using CWinThread T = AfxBeginThread(myFunc,NULL); My question is how do I wait for the end of this thread Like in win32 there was a WaitForSingleObject function. If needed, you can also use in MFC "plain" WinAPI function calls. In our example: CWinThread* T = AfxBeginThread(myFunc,NULL); // ... ::WaitForSi ...Show All
SQL Server Is this a real IN/OUT parameter?
I have the following stored procedure definition: CREATE PROCEDURE insertWsdls @url varchar(128), @source varchar(64), @hashcode int, @wid Integer output AS INSERT INTO Wsdls (url, source, hashcode, scan_date) VALUES (@url, @source,@hashcode, getDate()) set @wid = @@IDENTITY return GO When I looked at SQL Server Manager Studio, I found parameter @wid was identified as Input/Output parameter. However, it is defined as output in the procedure creation command. Why does the parameter @wid become an Input/Output parameter Hi, OUTPUT always means that this is also an input parameter. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
SQL Server store time
Is there any posibility to store only time and not date in sql server Even if there is no data type to support it, is there any round about way of doing it There are many approaches for that, storing time in a datetime column (with the date of 1/1/1900) storing the seconds / minutes after midnights (in the appropiate granularity as you need it) storing time as a string Depends on how you want to work with the data. HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Commerce Server Adding a Category to a Catalog then exporting the Catalog - Category doesn't get exported?
Hi, I've added a category using the business tools to the startersite. http://msdn2.microsoft.com/en-us/library/ms943107.aspx The category shows up in the site no problem, however when I export the catalog (using the business tools or the staging system), the new category does not get exported (its actually not in the XML thats produced). Any ideas, have a missed a step with adding new categories Thanks Hello Hansookwan, My questions are : Did you create only the category definition through the catalog manager in this case you should have the following sub-element bloc in your CatalogSchema element bloc of your xml file: <Definition name="Mycategory" Defini ...Show All
SQL Server run sql query on multiple databases
I need to run a same query on 15 different databases and union the results. Does any of the experts know how to do this with good performance Any help is appreciated. Phil....the only reason i posted in T-Sql is because i will be using this query in reporting services :) Thanks Yeah its fifteen different databases with five same tables and same sql code. I will try using SSIS and see the performance. Thanks ...Show All
Visual Studio Express Editions Directories?
Hi all I feel really stupid posting this question, because I know I saw it somewhere before, just couldn't remember where! Here's my situation: ------------------- I already have: - a listbox named " List1 " - a " Form_Load " sub which calls the " loadorrefreshdata " sub I need some code to do the following: - Get all the sub-folders in a specified directory (" testdir ") - Get the names of these subfolders (not the Directory.GetDirectories, as this returns the full path eg. "C:\Program Files\demofolder1\demosubfolder", where I only want "demosubfolder" as name. - Populate List1 with these names What would be the best way to do this Thanks in advance! Johannes H ...Show All
SQL Server help regarding SQL connection
i am developing a web application which requires a DB to store various data fields. Though i am familiar with both web development languages and SQL, I am having difficulty connecting DB to my web pages(jsp). Can any one help with ODBC/JDBC settings required regards sumit dagar What kind of difficulties you are experiencing For an intro how to use JDBC to connect to SQL server see: http://msdn2.microsoft.com/en-us/library/ms378672.aspx ...Show All
.NET Development Coud not connect to Sql Server 2005
when i am trying to connect to sql server2005 thru Visual studio i am getting an Error: "SQL Server does not allow remote connections (provider: Named Pipes Provider, error: 40 could not open connection to Sql Server)" Can any body tell me why is it happening and its Solution.... It looks like there are no network protocols enabled for SQL Server. This is the default situation with SQL Server Express Edition and Developer Edition. To turn them on follow the instructions here . ...Show All
Visual Studio Wrong Icon Pixel
I am working for a software company and we use Microsoft Visual Studio to edit all of our dialogs. In our dialogs, we have icons that are displayed as 16x16 pixels in the actual software, but in Microsoft Visual Studio, they are displayed as 32x32. The difference in pixels is a big annoyance as it is very difficult to position the icons when editing under Visual Studio b/c the actual size of the icon will be much different when it is launched in the software. The work around that we came up with is to create a new image type as 32x32 (the original icon is listed as 16x16 in Visual Studio). We then copy the original icon and paste it into the new 32x32 image type. There are a few limitations in this work around and we have thousands of icon ...Show All
Visual C# Plugin events C#
I hope this is the correct place to post this Q. I am also going to write a tutorial/blog/experience report on this as I cannot find the correct resources on the net, believe it or not (ok so my search keywords are not great!)..... I am writing my very first plugin for my application in C# I have created an interface. I have implemented this interface in the plugin. I have also created a IPluginHost interface, which sets the host (application) in the plugin. I can load/create/instantiate the plugin. Now, I have made a delegate/event in the interface. The plugin implements this. //delegate example: public delegate void DoSomething(string text); //event in interface and plugin: public event DoSomething OnEventDoSomethi ...Show All
Visual Basic Please help on file path question.
Hello guys, I wish to know the file path of my code resides. In VBA for Excel, it has ThisWorkbook.FullName property to retrieve the full file path where my code resides. I am trying to do that in other environments, like general VB console application or VB Script. What should I do to get the full file path of my code Thank you very much. for .NET: Application.StartupPath gives you the path of the folder your application is running Application.ExecutablePath gives you the path and filename of your application from where it is running from ...Show All
Visual Studio Express Editions View New Form
I am looking for help in creating a log file, and write the information to a text file to be displayed in a new form while the application is running any help will be appriciated. DKB Suppose you have two forms, say Form1 and Form2. Form1 has two buttons and Form2 has a textbox with Multiline set to true. Have a look at the following which should give you some ideas of one way to do this Imports System.IO Public Class Form1 Dim LogFileLine As String Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SW As New StreamWriter("D:\temp\logfile.txt") For X As Integer = 0 To 10 LogFileLine = &quo ...Show All
