mcland's Q&A profile
SQL Server The process could not connect to the distributor....
I have a small problem, I get this following error when trying to start the snapshot agent "The process could not connect to the distributor 'distributor name'. NOTE: The step was retried the requested number of times [10] without succeeding. The step failed. I thought it was related to users or rights but i am using the same user than in previous replication with the server and the rights haven't been altered. I don't know if someone has some knowledge of what to do or a workaround solution, any help would be greatly appreciated. Thank you in advance. Which version of SQL server are you using If you are using SQL 2005, the Window account under which snapshot agent process runs is used to co ...Show All
Visual C# TextWriter vs. StreamWriter
I am using this operation to write a string variable response to a *.csv file. It runs into some problem: information gets lost about 50% of the time. using ( StreamWriter sw = new StreamWriter ( pathq ) ) { sw.Write ( response ); } I figured that this is perhaps due to the fact that this class is not thread safe. Another class TextWriter is offered as a substitute however when I change the code above into: using ( TextWriter sw = new TextWriter ( pathq ) ) { sw.Write ( response ); } I get an error: Error 1 Cannot create an instance of the abstract class or interface 'System.IO.TextWriter' D:\VCsharp_Projects\tapTCPports_1\Class2.cs 127 37 tapTCPports_1 Why I posted the same q ...Show All
Commerce Server "Error from transport adapter for BatchComplete event"
Till yesterday our deployment involving the Commerce Sever Catalog and Orders adapters were working fine inone BizTalk application. But now we getting this message: The Messaging Engine received an error from transport adapter "CommerceServerOrders" when notifying the adapter with the BatchComplete event. Reason "Object reference not set to an instance of an object.” This tells us nothing. However there have been 2 recent developments on the server which could have led to this scenario: A second Biztalk application was added and it is now referencing the first one through a Biztalk application reference. Since the 2nd one also uses the Commerce Server adapters and the Microsoft Global Property Schema can reside in ...Show All
SQL Server Deadlock at trigger
a trigger need to insert or update record at the other table in high traffic environments however, the deadlock happens; ie, a trigger running twice at the same time want to need to insert record at the table. i trid to change isolation as SERIALIZABLE or REPEATABLE , but i cannot solve the problem. i guess the "while loop" affects the result because i try to cancel the loop and execute smoothly. How to solve the deadlock Thx ----------------------------- i used the following commands to change isolation level: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE begin transaction commit transaction ----------------------------- the code are as follows: declare setskuCursor cursor local static for select item, qua ...Show All
SQL Server Errors Upsizing an access 2002 Database to SQL server 2005
I have an Access DB with about 50 tables. When I run the upsize wizard all bur four tables import beautifully, data and all. Four of the tables fail with the message ' Table was skipped, or export failed' When I try to IMPORT the data I get 100 or so messages like this one: Warning 0x80047076: Data Flow Task: The output column "AssessPlanPHPID" (23) on output "OLE DB Source Output" (11) and component "Source - tblAssessPlan" (1) is not subsequently used in the Data Flow task. Removing this unused output column can increase Data Flow task performance. (SQL Server Import and Export Wizard) And the import fails. Note that the upsize creates the tables just fine, it just won't import the data. ...Show All
.NET Development Returning Exceptions with ExecuteScaler from RAISERROR in a SQL Proc
I am experiencing that I am not able to return an exception from a stored procedures that I call using ExecuteScaler if my select statement is before the RAISERROR statement. I do understand that if I use ExecuteReader I have to perform a reader.NextResultSet to get an exception to fire. This is working fine. Is there any way at all to return an exception with ExecuteScaler(after the select) or is this not possible. I'm looking for the answer so I can avoid using this method entirely and move to using a reader. Is using a reader and calling NextResultSet the next best option if I want to ensure all exceptions get returned and have good performance even if it is only returning one value I'm assuming this will perform bett ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Book ( In Progress )
For reasons I cannot exactly put into words, I’ve decide to write a (free) book about how to use XNA. It is defiantly a work in progress and thus far only includes two chapters and associated source code. I truly hope that my work is advantageous to some people out there. I am in part doing this as a practice towards writing technical documentation. I am not accomplished in writing instructions for other people that may not have the same level of technical skill sets as myself. I hope that with this book I learn a whole lot and more in that regard. Granted, if you are a diehard game programmer, what I have written is probably not for you, at least, not yet! Yet I would value your input. If you feel like c ...Show All
Visual Basic Date to string
Hi all i have taken a textbox named txt_date where date will be entered. now when i save it into microsoft sql server 2000 it saves one and only date "10/01/1900" though i enter any date in txt_date.text(textbox) now i think i would have to convert the value of txt_date.text in to string from date format. Can anyone pls tell me command line for the same... or there is any other way to save value of txt_date.text directly without converting... thanks & Regards Vimal Vimal Kea is right the value of txt_date.text is already a string format. If you would like to only store the date as a string then you will need to right code to insure that it is in the corect format and change the datatype of the column ...Show All
Software Development for Windows Vista XPS to GDI print path
Hi i want to use XPS to GDI conversion path for GDI based printer. From MSDN i came to know that The XPSDrv model also provides a converter for XPS to GDI format so that Win32 applications can print XPS Documents. How can i use this XPS to GDI conversion path . Is there any way to get a postscript as an output from an XPS printer Driver . Regards Abhishek Why not just print your xps-file on the postscript-printer like... // get a PrinterServer LocalPrintServer ps = new LocalPrintServer(); // get your PrintQueue to desired Printer PrintQueue pq = ps.GetPrintQueue("HP Laserjet 5Si"); // get a XpsDocumentWriter for the PrintQue ...Show All
Windows Forms Switching between Console application and Windows Forms applications
I was hoping to write a single application that can behave as Console application if specific run parameters are specified and behave as Windows Forms application otherwise (of course without the Console). For example: public static void main(string[] args) { if(//check if args has specific run params) { //do stuff Console.WriteLine(//results); return; } else { //Show nice form and all that } } Couldn't find any pointers as to how to achieve this. Any pointers Mad.Earth you can indeed. in your program.cs file, do a check on the number of parameters. If its more than 0 in length then do your thing else start the form. static void Main(string[] args ...Show All
SQL Server Outer join for two tables
Hi guys, Please Help! I am using Excel's VBA in order to retrieve sql Data. I have three tables of the "my Company " DataBase (sql server 2000): Table1, Table2, Table3 I need to join: Table1 .FieldXX= Table2 .FieldYY Table1 .FieldWW= Table3 .FieldZZ In both cases, I should retrieve all data from Table1 , even if Table2 or Table3 don't have the correspondent entries. I am trying to use the code below, but getting "sql syntax error" : FROM myCompany .dbo. Table1 Table1 LEFT OUTER JOIN myCompany .dbo. Table2 Table2 ON ( Table1 .FieldXX= Table2 .FieldYY) AND LEFT OUTER JOIN myCompany .dbo. Table3 Table3 ON ( Table1 .FieldWW= Table3 .FieldZZ) I ...Show All
Visual Studio 2008 (Pre-release) could i use trigger to do it? the communication between two element
There is simple scenario: I have a Textbox and a Button on canvas. When the mouse hover on the button, I want to change the background of the textbox. I want to know can i do with trigger method my code below: <TextBox > <TextBox.Style> <Style TargetType="{x:Type TextBox}"> <Style.Triggers > <Trigger Property="Button.IsMouseOver" Value="true" SourceName="b1" > <Setter Property="Background" Value="True" /> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> <Button Name="b1" Width="20" Height="39"/> ...Show All
Windows Search Technologies WDS 3.0 RTW fails to start
Hello, Install of WDS 3.0 RTW in WinXP ended OK. As it did not start automatically, I started it manually, and found that the Windows Search service is not running. Windows Applications Log reveals: The Windows Search Service has failed to created the new system catalog. Internal error <7,0x80070002>. Any hints Marek Hello Paul, I just want you to know that reverting back to WDS 2.6.5 works OK. Should you need any more input, please put a post here. Regards, Marek ...Show All
SharePoint Products and Technologies Unknown error when accessing advanced permissions
I have a newly updated updated WSS 3.0 site from version 2.0. Sometime after the upgrade I noticed that on many sites if I attempt to open the advanced permissions I get an 'unknown error' error message. From turning on advanced logging I see the follow error message: Application error when access /_layouts/user.aspx, Error=Object reference not set to an instance of an object. at Microsoft.SharePoint.SPSite.get_IISAllowsAnonymous() at Microsoft.SharePoint.ApplicationPages.UserRoles.InitPage() at Microsoft.SharePoint.ApplicationPages.CBaseAclPage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ...Show All
Visual Studio 2008 (Pre-release) Using Images and/or Accessing a ControlTemplate Item in a Custom Control
I have a custom control with a simple Image object in the generic.xaml: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Logo_Asset" > <Style TargetType="{x:Type local:Logo_Asset}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:Logo_Asset}"> <Image Name="LogoImage" Source="Resources/the_image.bmp"/> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> The image exists in the project in the resources folder and its build action is set to "Resource". The custom cont ...Show All
