John Fly's Q&A profile
SQL Server SSIS - Connection String Issue
Hi I have been trying to resolve a connection string issue all day, and havent figured out whats the problem. I keep getting the Acquire Connection error everytime I run my package. Can you someone review the format of my connection string, and confirm that it is indeed the correct format: I have two conn strings specified in my config file, one is to connect to a remote database and one is for local. I have validated the connectivity from my server to these databases via Management Studio, and it seems to connect fine. But when I run my package it keeps failing. SQL Server Authentication(Remote Database Server): Data Source=server_name;Username=useraccount;Password=xxxxx;Initial Catalog=dbname;Provider=SQLNCLI.1; Window ...Show All
Visual Studio CDATE() Error in RDLC
I'm having trouble with a line in my RDLC when trying to convert strings into dates I am taking the data from an xml file as a string and i need to convert the dates and decimal values into dates and decimals, so that when they are exported into excel they immediatly useable as dates and decimals. The only way i have found to do this is using CDATE(), which workd fine unless the date is blank. To get around this i am tring to use an IIF() and ISDATE() function which correctly identifies the dates and blank fields, but as soon as i put the CDATE() function in the formula it converts the dates, but brings up #error for all of the blanks. This is the line i am putting in the formula of the cell: =IIF(ISDATE(Fields!LeavingDate. ...Show All
Visual Studio Project being retreived incorrectly, help!
I did not store the project myself so I cannot tell you if there is a problem there. I know that the latest version of the build works. The project is a web application. I start by retreiving all the files and the .sln file into a directory. Upon opening the .sln file i am prompted to choose a working directory - it will not let me choose the current directory. It will then go into SourceSafe and retrieve *incorrect* versions of the files and place them into the new working directory. Not only that, it does not grab all the files that it is supposed to. I am wondering if it is a problem with the way the project file was saved/checked in, or if this is a problem with SourceSafe Why wont it use the files I grabbed as the prop ...Show All
.NET Development Can you push files onto a server in c#?
I am trying to upload a file using the HttpWebRequest class and the put command but I must admit I am a little new at it so I am not even sure if I am going about this the right way or not here is some code that I have written to try and get the file up to the server try { HttpWebRequest uploadRequest = ( HttpWebRequest ) WebRequest .Create(uploadUri + @"/" + fileName); uploadRequest.Method = WebRequestMethods . Http .Put; requestStream = uploadRequest.GetRequestStream(); fileStream = File .Open(fileName, FileMode .Open); byte [] buffer = new byte [1024]; int bytesRead; while ( true ) { bytesRead = fileStream.Read(buffer, 0, buffer.Length); if (bytesRead == 0) { break ; } ...Show All
Visual Basic OPEN NEW WINDOW WITHIN WEBBROWSER1 AND NOT LOOSE THE SESSION
I have this code whre I want to open a new window within browser1 of my form8 Instead I loose control of the browser and by loosing my session Private Sub WebBrowser1_NewWindow( ByVal sender As Object , ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow e.Cancel = True Form8.Show() 'Form8.WebBrowser1.Name = what goes here I am not sure what to do here 'Here I am forcing the opening of this specific website/I want to open whatever url is clicked Form8.WebBrowser1.Navigate( http://www.accountingonline.us/invoice/index.php page=open ) ' Form8.WebBrowser1.Navigate(sender) this did not work End Sub Can you show an example code Thanks I'd ...Show All
Internet Explorer Development IE7 Bug w/CSS Rounded Corners
Hello Here's a quick sample page illustrating the problem: http://jeffbowman.com/boxtest/ The latest versions of Firefox, Netscape and Opera all display both boxes just fine, but you can see what's happening in IE7. When I enclose the box in a form, it goes south. Any ideas how I can hack the CSS to get it to work in IE FWIW, I chose this particular rounded corners technique because it's straightforward and compact--I suppose can change, but I'd rather fix this one if I can. All suggestions appreciated, thanks! Jeff Bowman OK, got it. Turns out I had some of the CSS mixed up from the original order. I straightened that out and added the width style to the first layer, and presto. Here's the updated page, ...Show All
Windows Forms About ComboBox in DOTNET (Windows Application C#)
hi, Hope fine, How can i disable an Selecteditem in Combo Box But not removing the item. expecting the solutions.................... jesu... not that it not be displayed but as in.. it is there.. u click , nothing happens im not sure if there is a click event that is handled when the combo is dropped and something like a e.cancel if the value selected isnot the allowed one., and for disabling the value in the combo itself is beyond my knowledge of combos. ...Show All
Visual C# Object Oriented Programming
Hi all. Im a C++ Programmer that just moved to C# and am having problems learning about classes and objects, i just cant seem to understand it. Im not sure whether i have the wrong book, so any advice and help on the best place i can learn OOP for C# from would be much appreciated. Thanks. I did OOP with C++, and started to learn C# but then stopped programming for 6-7 months. Now i dont remember much on OOP and its concepts, thats the problem.Im confused about all aspects of OOP, i remember about classes,constructors,destructors,etc etc but now when i try to learn them i cant seem to understand any of it.Im using "Visual C# 2005 step by step" and "Beginning C#".Help would be much appreciated. ...Show All
Visual Studio Team System postbuild event
Hi, Would it be possible to add a postbuild event feature to the database project I have a scenario where I would like to run aspnet_regsql.exe utility to install/merge the ASP.NET 2.0 services database into the database that I am building with VSTS-DB. I basically want to avoid creating the ASP.NET services db schema by hand (or even importing .sql files) -- I'd rather run their tool and point it at the database created by the build. The postbuild event could provide some macros (e.g. Target database name, connection string, etc) that I can then use as command-line switches to aspnet_reqsql.exe. Thanks, Vitaly Vitaliy, It is an interesting idea, but there are already a few ways to do thing ...Show All
SQL Server outer join syntax problem
Hi guys, How can I translate this join into new syntax SELECT S . Dr_Code FROM GJCSite S , GJCJob_Det JD , GJCSub_Job SJ WHERE S . Com_Code = SJ . Com_Code (+) AND JD . Sub_Job_Code = SJ . Sub_Job_Code (+) AND JD . Job_Code = SJ . Job_Code (+) Cheers, Go thru this link.. i think this will help you... http://www.informit.com/guides/content.asp g=sqlserver&seqNum=75&rl=1 ...Show All
SQL Server help with an expression
I need to create an expression to handle a simple calculation. Here is what I have: =Sum(Fields!MH_POS.Value, "lexis_sales_dbdata_prd")/ Sum(Fields!MH_POS_Goal.Value, "lexis_sales_dbdata_prd") What do I need to add to handle the when the MH_POS_Goal = 0 I tried isnull and nullif and kept getting errors. This expression processes ok. But I am still getting the error message. Can someone help me update it to work correctly =IIF(Sum(Fields!MH_POS_Goal.Value, "lexis_sales_dbdata_prd")>1, (Sum(Fields!MH_POS.Value, "lexis_sales_dbdata_prd")/ Sum(Fields!MH_POS_Goal.Value, "lexis_sales_dbdata_prd")),0) ...Show All
SQL Server Management Studio - Index properties grayed out
If I right click on an index, the properties context menu is grayed out as well as the "New Index...", "Disable", and "Delete". If I right click on a table and click modify, I can add and edit indexes from there just fine. Strangely enough "Included Columns" is grayed out though. Was the database designer or table designer opened at the time We prevent the index dialogs from being launched when the table is being designed. The database and table designers work by making the state of the tables (including indexes) match the internal model in the designers. This includes index and constraint definitions. Reconciling the state on the server to the state in the model ...Show All
Visual Studio Team System Script INSERT statements for static data?
Hi, Following scenario - after importing database schema to VSTS4DB, I want to create a new static table called Countries with some data inside. I create a Table script (CREATE TABLE Countries ...) without a problem, and when I build I see the CREATE TABLE statement in the generated build script. I would like, however, to include also some INSERT statements, so that the static table can be filled with data as well. I tried to add a Script file to the solution, but whatever I write inside does not get included into the generated build script. If I include the INSERT statements directly in the Table script, they get ignored. How can I include INSERT statements into the generated build script It would be nice if there is a poss ...Show All
Windows Forms question of ListView,need help
Hi, My ListView control contain a "quantity" column and i need to do the calculation on the total of the "quantity", does ListView control allow me to do it Does anyone know how to write the codes to read the rows which contains the data on ListView control ListView can't calculate that sum for you automatically. One way is too keep the sum value and update it when you fill or update listView items which is better then calculate the sum after the listView is filled. But here is the code for calculating the sum from alredy filled listView: public int CalculateQuantity() { int sum = 0; for ( int i = 0; i < listViewControl.Items.Count; i++) { ...Show All
Visual Studio Express Editions media time calculation
Hi need the maths calculation for this: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If OpenFileDialog1.ShowDialog Then mplayer1.URL = OpenFileDialog1.FileName Timer1.Enabled = True Private Sub Timer1_Tick( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Label1.Text = mplayer1.currentMedia.duration But It displays the length as 345.232 for example. how would I format this as 3:00 for example ok not too much luck unfortunately. I thought the DurationUnitChange event would work but not quite. Well the current idea that is present is to do as ...Show All
