karaman's Q&A profile
SQL Server MSSQL datetime
Hi People I've just imigrated from mysql to mssql, but i've a few problems when im converting my data. When im trying to insert a date formated as yyyy-mm-dd hh:mm:ss intro a smalldate field, im just getting the following error: Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near '2006'. Their isnt set any special settings on the db or the table, i've tried to google it, but widthout finding any solution. Anybody have a idea of what im doing wrong Thanks in advance, Torben you have to qualify it with quotes create table #test ( rec_num int identity(1,1), dates smalldatetime ) -- this will succeed insert into #test(dates) values ('2006-02-04 01:01:01') -- ...Show All
Visual Studio Team System Change Project Build Order
Hi, I have this problem with team build: Solution: Solution.sln, Project: Project1.csproj, Compilation errors and warnings CSC(0,0): error CS0006: Metadata file 'C:\...\something.dll' could not be found Solution: Solution.sln, Project: Project2.vbproj, Compilation errors and warnings vbc(0,0): error BC2017: could not find library 'C:\...\something.dll' vbc(0,0): error BC2000: compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect. The something.dll is being compilied from a C++ project that is being reference by both C# (Project 1) and VB.Net (Project 2) projects. When I look at the build order in the team build log, the something.dll Project is not being compili ...Show All
SQL Server Migrate 2000 -> 2005
I've got the responsibility over a small SQL server with 8 Database and approx. 100GByte data online. Most database are used and need to be available 24*7*366. Also a number of local data transformation packages are defined and used on a regular basis. Furthermore a number of third party applications rely on this database. My question if it is worth the effort to migrate this to 2005 I know there are all kinds of nice migration wizards but do they really work What if one of the 3rd party apps don't like 2005 Love to hear both good and bad experiences migrating -> 2005 . Thanks Chen, did not know 2000 and 2005 can run side by side but this will greatly increase the possibility of a migration. I d ...Show All
SQL Server Execute Package Logon Failed for User....
Fairly new to SSIS.I have created a package in BIDS, and am trying to execute it so i can test/debug the flow and view the data in the data viewers. I continually get a logon failed for user... its the user id i am using to connect to my SourceConnection OLEDB. I have been struggling with this for a while now, and getting frustrated. I tried Windows Authentication also, still i get an error message logon failed for user...... I have tried all of the security settings, from Do not save sensitive to Encrypt all with password, entered the password, and then try to Execute Package from the solution explorer and still get error message. Thanks for your help! Here is the error message An OLE DB record is available. Source: "Microso ...Show All
Visual Basic Calculations
This is totally differetent from Access I have got a field's property set to money I need to divide that field by 2(sounds simple) but VB is haven a fit. I am used to me.text1= me.text2 / 2 its saying that / is not defined how do you divide and multiply in VBE Davids Learning You sound depressed, that's not a good thing. It is a learning curve, no doubt. Give it time and you'll get it. You've been getting away with murder back in the VB6 days. You probably got "the wrong idea" from doing that. Bite down and use Option Strict On on all your old projects. I'll pretty much guarantee it, you'll be a better programmer in two months. VB.NET is forcing you to become on ...Show All
Visual Studio Express Editions Framework-less compilation of console applications
Hello, is there a way to compile a simple console.writeline("Hello world") to a console exe that doesn't require the .NET Framework It's kinda stupid that such "program" requires that 10+Mb framework, things that are 100% kernal compatible (not (ab)using .NET features) should not request the install of the .NET framework in my opinion. the compiler should 'see' that it doen't use any fancy GUI/whatever stuff and thus compiles as normal non-.NET exe. but I guess my hopes are small or not existing at all right If you want to write code that doesn't use the framework, you need to use C++. Why would they take the time to write a compiler that scours your code and works out if ...Show All
Visual C# Misterious crash due to Listview, Bitmap & TabControl usage.
Greetings, My application crashes misteriously when i access a tabpage that contains a ListView displaying thubmnails images. (See stack trace below) The exception agent displays the following message with an association line connecting it with the " Application .Run( new Form1 ()); " of my "main" routine: "Parameter is not valid." It will only crash if, before i access the tabpage, the application's window is maximized. The listview is populated in the Form's constructor function. It uses the following simplified code: private void createThumbnails() { ThumbnailCreator t = new ThumbnailCreator (); Bitmap thumb = null ; thumb = t.GetThumbNail( "D:\\Documents and Settings\\T062948\\Des ...Show All
Software Development for Windows Vista How to get Replicator data in Parallel
When using a replicator with replicatorActivity1.ExecutionType = ExecutionType .Sequence; I can query the replicator data for the current executing activity in this way replicatorActivity1.CurrentChildData[ replicatorActivity1.CurrentIndex] When using replicatorActivity1.ExecutionType = ExecutionType .Parallel; replicatorActivity1.CurrentIndex is always the last index ( the replicator InitialChildData collection length -1) The question is: How can I query for the current data instance of a replicator in an activity that is running under the Parallel ExecutionType. Thanks in advance Hi angel, thanks for your time I don't want to predict the o ...Show All
Visual Basic Process status of getFiles()
Hi! How can I know the process stage of getFiles() from System.IO.Directory() Or .. how can I count the files in a directory faster I have some directories with over than 180000 files... Thanks. Try to pinvoke FindFirstFile, FindNextFile and FileClose. Don't know how much faster that is but at least you can provide feedback after each file found, so you app can stay responsive. www.pinvoke.net is of help to get the declarations correct. Check this as a starter: http://www.pinvoke.net/search.aspx search=FindFirstFile&namespace=[All ] -- SvenC ...Show All
Visual Studio 2008 (Pre-release) Measuring "rich text"
I have textual information that is currently stored as RTF. I need to display this text in a drawing element for a diagramming product that I'm working on. What I can't seem to find a solution for is how to determine the width and height of this text. I've tried using a RichTextBox - the ExtentHeight seems to be accurate, but ExtentWidth is just what I sized the control width to. I've read up on the FormattedTextClass which would give me the sizing information that I need, but I don't know how to load RTF into it. Can anyone assist Thanks in advance! I had a thought, is there anyway to go through the rich text, find all the images and mark them Then turn the file into x ...Show All
Visual C++ C++/CLI .NET threading model differences?
Hi, We have a native application in C++ using several threads and criticalsections between them. We've been developing this app using VC++ .NET 2003 and has been working quite good so far. Now we must use C++/CLI as a wrapper for presenting GUI to our native app. So far things went ok with the side by side managed and unmanaged code. However our threads starts to deadlock when they reach criticalsections. At first thought we figured it was perhaps a deadlock due to same thread aquiring same mutex twice. However the way that criticalsections often work is that they allow double locking by same thread. We've been going through our code but so far there's been no indications of errors. This leads me to think that the .NET threading m ...Show All
.NET Development Does GetSystemDefaultLCID map to System.Globalization.CultureInfo.InstalledUICulture?
I am storing a date using C++ with the system default language on an MUI system. I am then reading that data using C#. I read that the system default language in C++ maps to System.Globalization.CultureInfo.InstalledUICulture in C#. I also read that the InstalledUICulture will not change, that it is the culture when the system was installed. The system default language can change on an MUI system. How can I safely determine the system default language in C# It's recommended not to use InstalledUICulture. Simply using Thread.CurrentCulture or Thread.CurrentUICulture is the recommended way of determining default culture. CurrentUICulture is what you'd use for localization (dealing with different languag ...Show All
Windows Forms .net 2.0 visual style
Hi, I am using winforms .net 2.0 It seems that the visualStyle does not have any effect on the controls looks. for example a button looks as if you are using .net 1.0 Any thoughts please With VB.NET: Project + properties, Application tab, turn on Enable XP visual styles. With C#, ensure your Main() function in Program.cs looks like this: [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } ...Show All
SQL Server Error importing data from oracle database to an SQL database
Hi! When i was importing a database table from an Oracle Database to a SQL database table, the wizard returns this error: Could not connect source component. Warning 0x80202066: Source - VB_PERMISSIONS [1]: Cannot retrieve the column code page info from the OLE DB provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale ID will be used. Error 0xc0204018: DTS.Pipeline: The "output column "PE_ACTIVE" (34)" has a precision that is not valid. The precision must be between 1 and 38. (S ...Show All
Visual Basic Is there a Way to Open a Website's Source Code into a Texbox?
Dim allText As String Dim LineOfText As String FileOpen(1, "http://www.msn.com", OpenMode.Input) Do Until EOF(1) LineOfText = LineInput(1) allText = allText & LineOfText & vbCrLf Loop RichTextBox1.Text = allText FileClose(1) I tried that code and I got an Error stating the URL format is not supported. Okay, I tried your code but there is a syntax error of WebRequest Not being defined, I assume it could be that I need to declare it in an inport statement ...Show All
