astrocrep's Q&A profile
SQL Server DTS Import with no row terminator using VB
Using the DTS wizard in SQL 2000 Enterprise Manager, a DTS Package can be saved as a Visual Basic file. If a row terminates with a {CR}{LF}, the appropriate .ConnectionProperties("Row Delimiter") = vbCrLf is included on or around the third line of the package connection information for the text file. I have two different files that I cannot import using the saved VB file. One is a .txt file with a carriage return {CR} as a row terminator. This imports fine using DTS but not from VB. The row delimiter is omitted when the package is saved. I have tried adding the connection properties using vbCr, {CR}, and CHR(13) as the row delimiters, but none of these will import the file from VB. The other file, and the solution for this ...Show All
SQL Server Partitioned View Pruning Issue
I'm using Sql Server 2000 Standard Edition, service pack 3. I'm fairly new to partitioned views and merge replication. We have a 3-year set of monthly tables with about 1 million rows per table from some code we inherited. To ease development , I'm trying to create a local partitioned view. We wanted it to be UPDATE-able and be able to select data by a date range or by id without incurring very much cost. The problem is that my SELECT statements correctly prune the unneeded tables while my INSERT, UPDATE , and DELETE statements do not. Here's our basic structure: CREATE TABLE [dbo].[Call_2004_01] ( [id] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [callStartedOn] [datetime] NOT NULL , [rowguid] un ...Show All
Visual Studio 2008 (Pre-release) The project type is not supported by this installation?
VS2005 Team Suite RTM with SP1 Beta - XP SP2 - latest patches Hi, I have been learning XAML at the intro level. I had an old version of dotnetfx3 and wpf templates and I could create a project and run it. Yesterday I removed the old templates and the old framework with a removal tool and installed the RTM framework and new templates. However now I cannot open create a new project. The error message I am receiving is: "The project file c:\documents and settings\renee\localsettings\temp\4t4baj4.dyv\temp\WindowsApplication1 cannot be opened." The project type is not supported by this installation. I have not installed the extensions. I never have. I don't have enough disk space on the current system. What ...Show All
Visual FoxPro reading a directory for a existing files
hi there! im new to vfp and i want to make a programm that reads a certain directory and which gives me back the number of the files in that directory and the filenames. can someone tell me how it works in vfp it will really be great... thanks in advanced! novelle i've tried it but it seems that is not working... i have vfp 7.0 so with that code i get the number of the files in the directory how can i get then filename thanks a lot its really a big help! novelle ...Show All
SQL Server System Administrator Privilege
In SQL 2000, how do I grant system administrator privilege to "sa" or a Windows User The above links says about SQL Server 2005 version. In SQL 2000 also SA account in SQL Server has already got these permissions. To grant such permission to a windows user then add that user to SQL Server ==> Security --> Logins and then grant Systems Administrator privilege under server roles pane. ...Show All
Visual Studio 2008 (Pre-release) Open a xaml window from a C# form
This is probably a newbie question, but why cant i start a new c# windowform project and add a new xaml window to the project, and then add a button in the c# form to show the xaml window i got all the referances added, but it gives this error: "Error 1 The name 'InitializeComponent' does not exist in the current context" so i comment it out. then it shows a empty window, but none of the xaml elements are loaded. I also tried to give the xaml elements name, but i cant reference to it in the Window1.xaml.cs file... Thx for response Found the answer to all my problems here: http://www.windowsforms.net/Samples/Go%20To%20Market/InterOP/Crossbow%20FAQ.doc " In addition, you will n ...Show All
Visual Studio Team System Generate script for 2000 and 2005
Hi, The database I'm building needs to run on 2000 and 2005. I have the project set to SQL 2000. Now I have a script that grants execute permissions. It checks the server version and based on that executes a script for 2000 or for 2005. Like this: DECLARE @version CHAR(1) ; set @version = SUBSTRING(CONVERT(CHAR(20), SERVERPROPERTY('productversion')),1,1) IF @version = '8' -- SQL Server 2000 BEGIN DECLARE @sql NVARCHAR(4000) DECLARE @db SYSNAME ; SET @db = DB_NAME() declare @u SYSNAME ; SET @u = QUOTENAME('NT AUTHORITY\NETWORK SERVICE') set @sql ='SELECT ''GRANT EXEC ON '' + QUOTENAME(ROUTINE_SCHEMA) + ''.'' + QUOTENAME(ROUTINE_NAME) + '' TO ' + @u + ''' FROM INFORMATION_SCHEMA.ROUTINES ' + 'WHERE OBJECT ...Show All
SQL Server Binding WebService as Datasource
I've painstakingly managed to get a XmlDocument from a webservice and run this to retrieve data. However, i cannot bind any of the returned elements to anything. Any help appreciated. Are you using the XML data processing extension What is the Query that you are using More specifically, what is the Element Path for the query For more information, take a look at the following article: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnsql90/html/RepServXMLDS.asp Ian ...Show All
Visual C++ Property Overloading
I want to overload a property so that its type can be either 'ProgressBar' or 'ToolStripProgressBar' is there a way I can do this Unfortunately writing a template isn't really going to help either, because if you do it at the class level, you'll end up with two separate classes - one with the property to return the progressbar, and one to return the other one. At run time, you'd only be using one of them - so that won't work. The previous post, that suggested using inheritance, is really your best bet - but then if you can't rewrite one of the classes then that's also a nono. You could introduce a struct into your code that has two members, the progressbar and the other one (sorry can't remember wha ...Show All
SQL Server Unable to install SQL2005 I64 on a 2003 SP1 Itanium
Hello, I have many problem when I try to install SQL 2005 Ets edition ia64 on a 2003 ets Itanium edition. When I launch the setup, all is all right. But during the installation, it tryes to start MSSQL services. The staring of this service failed. So I try to start the service mannually. Nothing. Error messages I can get (in the event log) : Source : Service Control Manager ; ID : 7000 Description :Service SQL Server (MSSQLSERVER) failed to start due to the following error: The service did not respond to the start or control request in a timely fashion. Source : MsiInstaller ; ID 10005 Description : Product: Microsoft SQL Server 2005 (64 bits) -- Error 29503. Failure of the starting of service SQL Server. For more i ...Show All
Windows Forms How can I capture Keystrokes and analyze the content in RichTextBox (VS 2003)?
I am using a RichtextBox in my application (VS 2003).I wanted to find users keyword and highlight bold.I wanted to get keystrokes and get the word typed and compare it with a static list of words and make it bold if it matches.How can I capture Keystrokes and analyze the content in RichTextBox Thanks Take a look at the keypress/keydown events of the RichTextBoxControl: http://msdn2.microsoft.com/en-us/library/zk65089f.aspx Once implemented, just do whatever it is you want to do on this event, as you are stating to compare values hope it helps! ...Show All
Visual C++ C2248 error again
Hi, I have seen a few instances of this problem described in relation to derivation from classes with private copy constructors in VS 2005, but the behaviour does not seem consistent. Here is a simple example class: #include <sstream> class MyException : public std::stringstream { public : MyException( void ); ~MyException( void ); MyException( const MyException & x){} MyException & operator =( const MyException & x){ return * this ;} }; And some code that calls it: int _tmain( int argc, _TCHAR* argv[]) { MyException x; // Construct MyException y(x); // Copy constructor MyException z; z = x; // assignment ...Show All
Visual Basic OTP [VBA]: Help Please..
I made the following macro in Sage Accpac. Sub MainSub() ' ' ACCPAC Macro file: C:\Program Files\Sage Software\Sage Accpac\Macros\test.AVB ' Recorded at: Fri Jan 12 15:33:44 2007 ' On Error GoTo ACCPACErrorHandler Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE) Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE) Dim temp As Boolean Dim rpt As AccpacCOMAPI.AccpacReport Set rpt = ReportSelect("V:\CRYSTAL REPORTS\BOM-INVENTORY.rpt", " ", " ") rpt.NumOfCopies = 1 rpt.Destination = PD_PREVIEW rpt.PrintDir = "" rpt.PrintReport Exit Sub ACCPACErrorHandler: Dim lCount As Long Dim lIndex As Long ...Show All
Visual Studio Overloads do not display properly in Contents-tab
Try generating documentation for the following code using the August CTP: public sealed class OverloadTest { public void Run() { } public void Run( Guid id) { } public void Run( String name) { } public void Run( String name, string country) { } } The Contents-tab looks like this: Namespaces - Overloads Namespace - OverloadTest Class - OverloadTest Constructor - Run Method - Run Method - Run Method - Run Method - Run Method It appears that all the overloads do get listed but none of the parameters are visible in the Contents-tab. This makes the documentation of this method more difficult to use. Is this a bug Looks ...Show All
Visual C# Cannot implicitly convert 'type' to 'type' error
Code: string processName = processTextbox.Text; Process a = new Process(); a =System.Diagnostics.Process.GetProcessesByName(processName); a.Kill(); It returns this error: Error 1 Cannot implicitly convert type 'System.Diagnostics.Process[]' to 'System.Diagnostics.Process' C:\Documents and Settings\Deru\Mina dokument\Visual Studio 2005\Projects\ProcessKiller1\ProcessKiller1\Form1.cs 30 21 ProcessKiller1 And the help(F1) doesn't help me out too mutch, It says it's trying to convert a type into a type... Now I get this: Error 1 Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keywo ...Show All
