Binary's Q&A profile
Visual Studio 2008 (Pre-release) July CTP - From WSHttpBindingElement To an instance of WSHttpBinding
I am atttempting to read service model configuration from different configuration files and have my custom configuration manger to supply the bindings to my application on demand. Given a configuration in a separate file, I am to up to getting to IBindingConfigurationElement (such as WSHttpBindingElement) for the required binding. I know that I can create (manually) an instance of say wsHttpBinding from the WSHttpBindingElement (say). However I want to know if there is already a way to do this in the service model assembly. If the functionality exists but is not exposed, is there way to use reflection to such method etc. Thanks. It appears that such method already exists and it is public (Thank you :-). Here is the code snippet (f ...Show All
Windows Forms what will happen if i use command builder
hi my program raise concurrency violation exception and i read all of the articals that MSDN says about that exception but at lastt one of my friends says that i need to use the command builder to make the update statment manually instead of using wizards in vb 2005 to generate sql statements so if i use the command builder is the concurrency violation exception will disappear if not what is the solution for that exception i need help really i disappointed thanks in advance. Here's an example: public static SqlDataAdapter CreateCustomerAdapter( SqlConnection connection) { SqlDataAdapter adapter = new SqlDataAdapter (); // Create the SelectCommand. SqlCommand command = new ...Show All
SQL Server EventHandlers firing events
I ran into a pretty bizzare behavior in SSIS: I am trying to set up a package with a built-in auditing. It has a OnPreExecute, OnPostExecute and OnError event handlers. I am trying to record when the package starts, completes, and the completion status. Each one of these event handlers has a script task that does the logging. I put in debug message boxes into each event handler script to understand what goes on. So here's the sequence of events: 1. When starting the package the OnPreExecute event fires. Right away it fires the second time. I'm guessing what happens here is the script task within the event handler fires its own OnPreExecute event - that's how the first message really pops up. The second message is generated by the act ...Show All
.NET Development SQLDataReader.GetOrdinal() fails rarely with IndexOutOfRange
Hi everybody, We were developed some Web-Services that run against SQL Server 2000 with SQLDataReader that executing Stored Procedures in the DB. Most of time (95%) everything is running well, but sometimes (when exactly, we don't know) the same WebService that worked 200 times, fail. The code is simple: public string myFunction( int ANumber ) { string strRetVal = null ; SqlDataReader myReader = null ; SqlConnection MyConn = null ;   ...Show All
Visual C# Create DataTable in Class
I have a class file and I want to create a Datatable in it.....How would i do this....Do i create the table in the property or would i need to have like a CreateTable function pretty much yes :-) rule of thumb is: Have a method which does tasks, in this case, create and return the datatable Properties to be used as getters and or setters, to get or set the private property in the class in question The "outside" class to be able to create an instance of this class which can then access its public functions/methods to do tasks. ...Show All
Visual Studio 2008 (Pre-release) How does LINQ search collections?
First, I'm pretty ignorant on the internals of LINQ, so I've been searching around regarding this, and not found anything so far. Since it seems for LINQ to work with a collection, all it needs is to implement IEnumerable, then I was wondering if that means LINQ uses sequential search when evaluating queries on a collection Is it possible that the concrete implementation of IQueryable can be written for each collection type to specifically exploit better search algorithms such as binary search or whatever the collection supports If yes, then I also wonder if Microsoft has actually done that for the standard collections that have better search algorithms than sequential search Obviously it is not a problem for querying against a database ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Security Problems for every project
Hopefully someone can help me sometime soon, because I am finally out of school and will be coding for a while now. Anyway, ever since I tried to load a project off of one of my other computers on the network, all of my applications have security problems. Even now when I try to load projects from the local hard drive, VC# tells me I have a security problem. Some apps will run, but others say access denied on many of my project files. If anyone knows of settings that will change the security back to normal, that would be a great help and thanks in advance. Thank you for posting first of all. I did copy the solution from another computer to my hard drive after I figured out it would not work. I ...Show All
Visual C# Application settings lost upon new assembly
Hi all, I'm facing the same problem as issued in this topic . I tried the solution with ApplicationSettingsBase.Upgrade() but it doesn't work out. First of all I need to put System.Configuration in front of it, I don't know if this really matters. Second my intellisense only offers me .Equals, .ReferenceEquals and .Synchronized but no Upgrade. My application is working correctly, I assigned settings using the Settings designer and I use them using Properties.Settings.Default. ... To be honnest I've been reading a bit here and there but I miss the total picture, I do not see where I mess up. All help is appreciated. Hello All. Jef Patat and Dan: First of all, Jef Patat, ...Show All
SQL Server Service broker as job scheduler
Hi, I have read that service broker can be used to manage and schedule jobs. but how is this more of an advantage compared to the current sql server job scheduling using the sql server agent. thanks in advance. Would appreciate if somebody can answer immediately Use SQL Server Agent. Service Broker can be used as a job scheduler, yes, but that's really just a side-effect of some other features creatively put together. You'll have none of the rich job creation scheduling, logging, and auditing features that you have with Agent (unless you roll your own -- but why would you reinvent the wheel ) -- Adam Machanic Pro SQL Server 2005, available ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 3D DirectSound 5.1 playback w/ DSBCAPS_LOCSOFTWARE?
I've been playing around with the Play3DSound example as a testbed for a problem I'm working on. When I run this test app, the 3D sound plays just fine through my 5.1 speaker system as expected. But if I add the DSBCAPS_LOCSOFTWARE flag to the sound buffer, it plays through the L/R speakers only. After some research, I'm pretty sure this is due to DirectSound's internal HRTF calculations. So my question is: Is there any way I can use software buffers and still get 5.1 3D sound (Or, do 5.1 3D sounds always require hardware buffers/acceleration ) My config: WinXP SP2, C++, DirectX SDK (Oct '06), aBit IC7 mobo, no special sound card (only using the mobo's RealTek ALC650 chip). Cheers! -john ...Show All
Visual Basic Using VB with a MS Access Database: back-end: configuring access levels
Any help would be greatfully recieved here! I'll try and explain the situation here... I have a database in Access, which is in essence a booking system. I am using VB to link to this database. There are people that log onto this system. The problem / question: The people that use this database have different access levels. I have some people who I want to have "read-only" access, some people I want to give them "Read / Write" access to, and some people I want to give them "Full Control" access to. Using a security table with levels of access is the way to go, but what would this code look like How would I keep a level of security on a global variable, test the variable each time the use ...Show All
SQL Server Deploy Reports via Visual Studio 2005
This seems to be a basic issue, but I am having a problem trying to deploy a report to Reporting Services. I have setup the deployment options under the properties of the Project. But each time I try to deploy a report, I get "The request failed with HTTP status 504: Gateway Time-out" When I try to connect to connect directly to the TargetServerURL via a web browser from my client or the server itself, I can browse the structure fine. Not sure why I can't deploy via Visual Studio. Thoughts Thanks To localize the test, I put the system running the Visual Studio on the same subnet. It's wide open with NO ACL control or routing from that point. ...Show All
Visual FoxPro set talk off settings scope
hello, I use vfp 6 and win xp as o/s. my client uses win98. when i run exe on te client's computer . it works as "set talk on " but on my computer it works fine. help. -ravindra Make sure you compile with a bare Config.fpw file containing TALK=OFF and also do a SET TALK OFF in the Load() method of your form's base class. (it's scoped to the session). ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How can I check whether the mic is connected...
Hi all...,, I had designed a media player with Recorder in VB.Net 2003... I have one problem with it.. That is when one going to Record without connecting the Microphone means I need to give an alert to user like "You need to connect the Mic for proceeding Record" for this I need to check the ports get the status of ports... Can anyone give me an idea to resolve this... Regards.., RR. I'm not sure you really can tell or not...maybe by measuring input volume. But I don't think there's any way to flag if it's connected/ready or not. ...Show All
Visual C# Run Application
hi, as you all know, I have a reputation for making a text editor with extra functions. I'm continuing with this fancy text editor, and am now asking if it is possible to run other applications using my program and C# eg. As you all know, MS Word is the biggest text editor made. I want to add some word art to my RTB, but can't do it in my own editor. How do I run MS Word using my application so I can add it Thanks. Eragon. There are 2 things in your question: 1) Run an application from your code like you open Internet Explorer from your application like this: System.Diagnostics.Process.Start("iexplorer.exe"); You need to specify full path of exe in order to run that! 2) You are talking about Word art ...Show All
