K::ot???ter's Q&A profile
Visual C# help to problem with if-sentence?
Hello I have a piece of syntax in a button, so the syntax is executed when the button is pressed. Syntax: if(sog_tb_text.TextLength <= finaltextlength && sog_cb_kriterie.Text != "" && sog_rb_igang.Checked == true || sog_rb_afslut.Checked == true) { //This syntax in here works. } else { string fejltext = ""; fejltext += "Ret Folgende:\n\n\n"; if(sog_rb_igang.Checked == false && sog_rb_afslut.Checked == false) { fejltext += "Der er ikke markeret i \"Igang\" eller \"Afsluttet\" opgave\n\n"; } if(sog_tb_text.TextLength > finaltextlength) { fejltext += "Der er over 250 tegn i \"Sogefeltet\"\n\n"; } if(sog_cb ...Show All
.NET Development Updating IBindingList from different thread
I have a DataGridView which draws it's information from a BindingSource. This BindingSource gets it's data from a BindingList. Now, I need to update this BindingList from a different thread than the one that the DataGridView is implemented on. When I try to do this, I catch a thrown exception and the exception says that I cannot modify the control from a different thread (understandable). However, how can I work around this In my opinion, shouldn't the BindingSource or DataGridView controls ensure that the control is updated from the implementing thread Is this a bug Any suggestions would be welcomed - Thanks! ~ matt ISynchronizeInvoke is one way to implement a SynchronizationContext. Windo ...Show All
Visual FoxPro config.fpw
how i can find my config.fpw how i can call my program that use only my codepage=950 for hongkong characters i wan create my own config.fpw and at my main.prg call this config.fpw... how i can do that thanks in advance. Yes. If your exe path&filename is: c:\SomePath\myApp.exe then config.fpw path&filename is: c:\SomePath\config.fpw ...Show All
.NET Development Creating XMLReader from a MemoryStream (C#)
Does anyone know why this doesn't work (it leaves me with an empty XmlReader) MemoryStream memStream = new MemoryStream(); XmlWriter writer = XmlWriter.Create(memStream); tempSerial.Serialize(writer, objectToSerialize); XmlReader reader = XmlReader.Create(memStream); In this example, tempSerial is an XmlSerializer. When these lines of code complete, I have a MemoryStream that contains data and an empty XmlReader, but I don't know why. Please advise. Thanks, Justin memStream.Position = 0; // Resets the position to 0 so we can read. and congratulations to me on my 600th post ...Show All
SQL Server The login failed
I tried the following code Sub CreateDataAccessObjects( ByVal db As Database) ' Create relational datasource Dim ds As New RelationalDataSource( "THYROID" , "THYROID" ) ds.ConnectionString = " Integrated Security=SSP; Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=THYROID" db.DataSources.Add(ds) ' Create connection to datasource to extract schema to dataset Dim dset As New DataSet() Dim cn As New SqlConnection( " Integrated Security=SSP; Data Source=localhost;Initial Catalog=" & CbDatabase.Text) ' Create the customers data adapter with the ' calculated column appended Dim daCustomers As New SqlDataAdapter( " ...Show All
Visual Studio 2008 (Pre-release) WCF Authentication - Point me in the right direction pls
Greetings, I am writing a c# 2005, smart client application and have decided to use WCF as the transport layer. Having previously only used HTTPS ASMX based web services for such a distributed style application I am quite new to some of the concepts involving how to secure WCF. Perhaps someone can recommend the best approach to my scenario, the smart client will be public web based and ClickOnce updateable, therefore no Windows usernames or groups will be used, each smart client user has a set of 4 custom credentials required in order to logon to the WCF service, these credentials would be checked with custom code which looks in a back end SQL database. In the past I have kept it pretty simple and used a custom single Logon me ...Show All
Software Development for Windows Vista how to restart workflow runtime after IIS restart
My question is for workflow exposed as web service through webserviceinputactivty/webserviceoutputactivity. My impression is that workflow runtime is only started after the first web service call. My test workflow has 3 activities: webserviceinput, webserviceoutput, delay. SqlPersistence service is enabled. The workflow is activitied through a web call. When executing the delay activity, it's persisted to the database. Then I shut down the web server (ASP .NET development server). When the web server restarted, the timer already expired but the workflow was not resumed. Only after I made another call to the web service, the timer fired. I did an experiment in a winform application. When the application starts next time, the timer fir ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Games Article in XBOX Magazine.
Congrats to the teams who built iFactor, Eternity's Child, Racing Game, Wildboarders, and Last Alarm : The A.R.G.U.S Complex. All these games have write-ups with screenshots in the lates copy of "Official XBOX Magazine". (Just got it in the mail yesterday) Also in the magazine, details on the next DBP contest. They list the prizes and they are very nice I must say! By "Racing Game", do you mean XNA Racer I can't wait for starter kits that use XNA 1.0. A look at professional games that demonstrate effecient coding styles and best practices would do wonders for my cluttered code. ...Show All
.NET Development TcpClient & TcpListener On Windows Vista
Hi! I'm trying build a simple tcplistener and tcpclient in VB.net. and when tcpclient try to connect with de tcplistener always give me the same error: " No connection could be made because the target machine actively refused it" I'm using Windows Vista, and may be this is the problem, because i have tried run the same code in other pc runnig with windows xp and run correctly. I have turn off Windows Firewall, i have open the port i going to use, i dont have other other internet security program... but the problem persist. I have the same problem with others server aplications, clients can not connect with me. Has Windows Vista some security featury or something for "actively refused" extern connections How i solve this problem ...Show All
Windows Forms ListView Column Widths Question
Hi folks, I'd like to retrieve the current width of a column in a ListView, except I'm having troubles figuring out how to get the column I want to work with. My WinForm is using C/C++ - advice -Zero Hi nobugz, When I use the proper syntax (as you pointed out above), I receive the following compiler errors: error C2845: '[' : cannot perform pointer arithmetic on __gc pointer 'System::Windows::Forms::ListView::ColumnHeaderCollection __gc *' error C2227: left of '->Width' must point to class/struct/union The line of code now looks like: int iWidth = listViewLogWindow->Columns[0]->Width; -Zero ...Show All
SQL Server Like Search causing Filter and bookmark lookup
Hi i have the following like search which is really complicated . I feel like there should be a way to reduce this i got indexing on the table for the field but not sure if its working correctly. Here is an example code for the search. and result is the result im looking for declare @Cite varchar(12) create table #temp ( Cite varchar(50) ) insert into #temp (Cite) values ('234') insert into #temp (Cite) values ('1234') insert into #temp (Cite) values ('231234') insert into #temp (Cite) values ('ab234') insert into #temp (Cite) values ('000234') insert into #temp (Cite) values ('000234b') insert into #temp (Cite) values ('234ca') insert into #temp (Cite) values ('0h234ca') insert into #temp (Cite) values ('h234ca') insert into #te ...Show All
Software Development for Windows Vista Custom Xoml
I have custom Activities that i had created, one of them is an image picker, that uses an image resource manager, which stores all selected images as binaries How do i go about persisting the manager along with the activity: ImagePicker into a xoml file Thanks One possible approach is to store only image names in the manager and store the actual images in a seperate resource file. At runtime, you manager will look up the image based on a the name. XOML is not designed to store large chunks of binary data. Shelly Guo ...Show All
Visual Studio Is it possible to get the DTE2 com object when starting devenv.exe with parameters...?
I am currently writing some Visual Studio automation and would like to use the experimental hive so that when one of our users fires off Visual Studio from within our code any changes we make through code to windows toolbars etc are not persisted in their main version of Visual Studio. I have experimented with windows configurations, restoring settings on close etc, but this is still to risky for my liking (if the program crashes Visual Studio will be pretty messed up next time it is loaded outside of our code!!). This works perfectly from the command line using the rootsuffx argument but my problem lies in the fact that I need to start devenv.exe from code and get hold of the DTE2 com object. At present we do this by getting the CLSID or ...Show All
SQL Server Help with converting code: VB code in SQL Server 2000->Visual Studio BI 2005
Hi all--I'm trying to convert a function which I inherited from a SQL Server 2000 DTS package to something usable in an SSIS package in SQL Server 2005. Given the original code here: Function Main() on error resume next dim cn, i, rs, sSQL Set cn = CreateObject("ADODB.Connection") cn.Open "Provider=sqloledb;Server=<server_name>;Database=<db_name>;User ID=<sysadmin_user>;Password=<password>" set rs = CreateObject("ADODB.Recordset") set rs = DTSGlobalVariables("SQLstring").value for i = 1 to rs.RecordCount sSQL = rs.Fields(0).value cn.Execute sSQL, , 128 ...Show All
Visual Studio Team System Required permissions / roles in order to import schema?
What is going to be the minimum permissions or role memberships that a DB developer will need in order to be able to import a schema from a DB into the tool Is there a way to prevent any developer from importing the schema from a certain DB Thanks, AW So, the minimum required in SQL Server 2005 is VIEW DEFINITION permission, is this correct or for any reason will you require a any other permission ...Show All
