Robertis Tongbram's Q&A profile
.NET Development sharing of textfile (FileShare method not working)
Hi guys, I'm working on application with multiple instances running in the same machine. In this application I'm accessing file "test.txt" and the other instances also needs this file. But the first application who will get to open the "test.txt" will have the write access and the other instances will only have read access. Below is my code snippet: if (singleInstance) {FileStream fs = File .Open( @"C:\test.txt" , FileMode .Open, FileAccess .ReadWrite, FileShare .Read);} else {FileStream fs = File .Open( @"C:\test.txt" , FileMode .Open, FileAccess .Read ) } When I tried running my application, I open the test.txt in the notepad and I can open it but can't do any mo ...Show All
Visual C# Using a C# dll with a VB 6 front end.
Ok, so here is my question. I was trained in C++ and Java, and have taken to C# rather likeably. My issue is that I am currently supporting a custom internal app that is written in VB 6.0. The plan is to move the app to a ASP.Net 2.0 platform, and thus my question. If I started developing a library that I could use to fix some of the issues with the current program, and wrote them in .Net (2.0 likely), and compiled a dll, would there be an issue with using that dll and the methods within in a VB 6.0 application I'm hoping I can move some of the business logic out of the application, clean it up some, and make it so it can be consumed by the future version of the app at the same time. TIA! You are in luck ...Show All
Visual C++ SetCheckboxValue method
Hi, When i try the SetCheckboxValue method i get a compile error saying identifier not found... This is the actual code i get the error at: SetCheckboxValue(IDC_mycheck, true ); Any ideas Cheers Anger. ms-help://MS.MSDN.vAug06.en/shellcc/platform/shell/reference/ifaces/icredentialprovidercredential/setcheckboxvalue.htm ...Show All
Visual Studio running vsjitdebugger.exe through IFEO on Vista
Hi, I tried to debug an application through image file execution option on Vista. I set the Debugger string to point to vsjitdebugger.exe and I get the message box: Any idea --------------------------- Visual Studio Just-In-Time Debugger --------------------------- An error occurred while launching '"C:\Program Files\Internet Explorer\iexplore.exe" ': Only part of a ReadProcessMemory or WriteProcessMemory request was completed. Check the documentation index for 'Just-in-time debugging, errors' for more information. --------------------------- OK --------------------------- Hi, Unfortunately this scenario will not work with VS2005 on Vista b/c of some problems with vsji ...Show All
.NET Development How can I run an User Control using a Web Application...
Framework Version1.1. I have a User Control inside a Windows Control Library named WCL1. I embed that User Control inside the web Application(named WA1) using <Object> tag.. Along that I have Add the reference for the WCL1 Now if I access through. http://localhost/WA1/WebForm1.aspx means it works... But if I access through IP Address for eg.. http://IP/WA1/WebForm1.aspx means it will not works... Please anyone give me an Idea.. Web controls dont have any security problem like Windows Controls have so just your computer security settings are preventing control to download and display. Check the following things: 1) Make sure object Tag is formed well... 2) Loose your IE settings to download ...Show All
Audio and Video Development Event Target
Hi Chapter 8 of specification gives the larger picture of Event Processing. It says that user events are fist processed by the script and after that markup gets chance to process the event. eg if a user presses a navigation key then first the script (through event handlers ..if one is regestered ) first processes the gesture and after that (if allowed by script) the markup processes the gesture --changes the focus to the next element (depending on the navigation key). If the above is correct then this means the target for the keyboard events is always the current focused element. One exception might be access ( or shortcut) keys in which case the target is the element for which the short key is defined. ie script cannot override the acc ...Show All
SQL Server permissions granted to an application intead of a user
I have an application that talks to an access db located on a 2000 server. I would like grant permissions to the application instead of a specific user. Any help would be great... I am including a link to a related entry in this forum where we have a detailed discussion on this topic: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=786513&SiteID=1 I hope this information will be useful. Thanks, -Raul Garcia SDE/T SQL Server Engine ...Show All
Visual Studio Express Editions collapsing comments
Hello. Everytime I open a project all the comments and regions are expanded, is there a shortcut to collapse all comments Thanks in advance. OniShiro, Choose the codes you want to comment, press Ctrl+K, hold the Ctrl key and press C. Then you comment all the chosen codes and just collapse them There is the same operation on uncomment, too. Choose the comments then press Ctrl+K, hold the Ctrl key and press U. ...Show All
Visual Basic Modifying datagrid doesnot update the dataset
Hi folks, I populated a Sql Server table into a datagrid using SqlDataAdaptor and dataset, which works fine. What I want to do now is to update the table when the data in the datagrid is modified. I added these 2 lines, but doesn't work, ds.AcceptChanges() da.Update(ds.Tables(0)) It seems that changes to the datagrid doesnot update the dataset. Any comments appreciated. Thanks! There is no error. The code to fill a dataset and to bind to datagrid is pretty standard one other than adding a new DataGridTableStyle Dim ds As New DataSet Dim conn As New SqlConnection("Persist Security Info=False;Integrated Security=SSPI;database=local1;server=(l ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Where are these "assets", "samples" and "starter kits" etc?
I bought my annual subscription to the XNA Creator's Club yesterday. I've just read this on the Creator's Club description: "Both subscriptions provide aspiring game developers with access to thousands of game assets from Microsoft and key partners such as Turbo Squid Inc., as well as white papers, specialized starter kits, samples and technical product support to help turn Your World, Your Game into a reality." Can anyone tell me where I can find these "assets", "white papers" and "starter kits" etc AlfonsAberg wrote: Is there any big changes from the GSE beta 2 to GSE v1.0 No extra starter kits All I can see so far is that it allows you to run your ...Show All
Visual Studio Team System How to use admin user at TeamServer PC to unlock the file locked by other user at his PC?
For example: 1--Project Name: $OKProject/TTD 2--User Name: A, his PC is named A_PC, his workspace is named A_WorkSpace. His workspace local D:\OKProject at his PC . 3--He lock a file : TT.cs. 4--I, admin, my username : liujj, at Team Foundation Server PC, my workspace on the server pc is named liujjWorkSpace. My worksapce local E:\OKProject at ServerPC. 5--I must use ServerPC to unlock this file by Team Server Admin user. 6--I search 'unlock' on MSDN, find some ways, but when I use 'tf lock /lock:none /workspace:liujjWorkSpace E:\OKProject \TTD' command , that not succese. 7--I have try : If this file is locked by me and locked at TeamServer PC, this command is OK. 8--My Team Foundation Server is workgroup, not Dom ...Show All
SQL Server SQL Injection prevention
I am building my first ASP.Net app from scratch and while working on the DAL I came across the problem of SQL Injection. I searched on the web and read different articles but I am still unsure about the answer. My question is should I add db.AddInParameter(dbCommand, "AvatarImageID" , DbType .Int32, avatarImageID); Add in Parameters to my C# code to avoid SQL Injection. What is the best practice. I am unclear if the stored procedure already helps me avoid SQl Injection or if I need the add in parameters in the C# methods to make it work. I need some help. Thanks, Newbie My C# update method in the DAL (still working on the code) private static bool Update( AvatarImageInfo avatarImage) { ...Show All
Visual Studio 2008 (Pre-release) Working with WCF Service
I am trying to use the Entity Framework with a WCF service. It is giving me the following exception: System.ArgumentException was unhandled by user code Message="The default entity container name 'eKnowledgeSpaceDBModel.eKnowledgeSpaceDB' is invalid. The required mapping and metadata information could not be found.\r\nParameter name: defaultContainerName" Source="System.Data.Entity" ParamName="defaultContainerName" StackTrace: at System.Data.Objects.ObjectContext.CreateMapConnection(String connectionString, String defaultContainerName) at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) at eKnowledgeSpaceDBModel.eKnowledgeSpaceDB..ctor(String connect ...Show All
Smart Device Development Finding or creating a text phrase program or service?!?!
Hi there, I was wondering if any of you guys know of an existing application or a way to develop a program that allows me to push a button on my PocketPC, which will open up a dropdown (or something) that has a list of pre-defined phrases Our company has 100 field service engineers which will use PocketPC's to update their labour entries for work that they do, and we want to provide them a way to easily enter commonly used text phrases into a few different programs on the PocketPC. Phrases like "Call customer xxxxxx on phone number xxxxxx service arranged for xx/xx/xx xx:xx" or "Travelled to site and met with contact". Now, I don't know if a simple program/service like this exists or not, but if it doesn ...Show All
Smart Device Development Problem Compiling Tutorial With VC++ 2005 Win32
To Whom It May Concern, I have tried compiling the following tutorial program in Visual C++ 2005 Win32: #include "stdafx.h" #include "filetest2.h" #include <fstream> #include <iostream> #include <string> using namespace std; int main() { char FileName[20]; char EmployeeName[40], Address[50], City[20], State[32], ZIPCode[10]; // 1. Uncomment the following section to create a new file /* cout << "Enter the Following pieces of information\n"; cout << "Empl Name: "; cin >> ws; cin.getline(EmployeeName, 40); cout << "Address: "; cin >> ws; cin.getline(Address, 50); co ...Show All
