cmwith's Q&A profile
Visual Basic Determine the ID of a record from a Datagrid
I've a Datagrid on my form and I need to know the value from the RecordID field regarding a particular cell that I've clicked. In other words, lets say I have a datagrid showing fields Name, Address, City and when I click on the cell regarding address I need to get the ClientID field from the database. How can I get that Thanks, Joao Pinto Using your code I receive an error message: Index was out of range. Must be non-negative and less than the size of the collection. Here is the code that I've: Private Sub DataGridView1_CellClick( ByVal sender As Object , ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick Dim Row As DataGridViewRow = ...Show All
SharePoint Products and Technologies Setting up a development & deployment enviroment
Does anyone have any suggestions on the best arrangement of systems to develop, test, and deploy SharePoint 2007 workflows I would like to develop on my workstation and run and test on a development server and then deploy to my production server. Can I use Vista on my workstation and Server 2003 on the servers Has anyone been using virtual machines, if so what are you using for the host OS Hi Simplest way is to have a virtual machine with MOSS and Visual Studio, Still have not tested Vista a host but i think the beta of VMWare and VPC both support vista. How ever if you want to you can develop on your workstation it is possible but in order to keep it simple and easy i would reccomend having t ...Show All
SQL Server Can I launch an application using T-SQL?
For example, before bulk insert, I should uncompress zip files (or untar) from remote machine. ...Show All
Visual Studio Team System How to profile a smart device application using performance explorer
I am running an application on Windows Mobile 5.0 Pocket PC emulator. How do I profile this application using performance explorer of Visual Studio 2005 Team edition( for developers) Are you saying the performance profiler doesn't work for apps targeted for devices, either on the target h/w or in emulation mode I've tried the Remote Performance Monitor that came in Compact Framework 2.0 SP1, but its more of a high level tool. I need something that can drill down to the function level. ...Show All
SQL Server HELP : How to back up a database on ms sql 2005 studio express
hi Im using the free version of ms sql 2005 studio express. I can upload databases, edit them and check them etc. how do I back them up on to my pc, I do not have the server with me, my ms database is hosted on namesco.co.uk hosting. I know how to right click the database, click task and back up. But I dont know where to back it up Whenever I try to back up to somewhere on my c: drive it won't. I think it also only backs up on a .bak files. Which I don't have. I've looked on the net and it says you need a seperate hard drive or tape drive for back. Do I need to add another hard drive to my pc, if yes what do I format it as. And also how do I get a .bak file Here is a screenshot of where I can get to:(you might have to cop ...Show All
.NET Development .Net 2.0 InvalidCastException when passing COM invisible object in COM event
Hi, In .Net 2.0 I'm getting InvalidCastException "Specified cast is not valid" when I'm passing ComUnvisible object to event as parameter of type Interface. The case is: I have a .Net class as COM object that is consumed by unmanaged client. The COM object has one method and one event: Here is the declaration of ComSourceInterface: [ Guid("47DE130A-8F24-4f5a-B384-9EF5B9670914"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface IComTestEvents { [DispId(1)] void EventMethod(IArgument b); } And following call causes exception: public int CommonMethod(int a) { IArgument arg = new ArgumentDer(a+5); try { if (EventMethod != null) EventMethod(arg); } catch (Exception e) { log.Deb ...Show All
Visual C++ Overriding OnFileSave()
Hi, I am trying to override CDocument::OnFileSave() in my application. This is what happens when the save button is clicked: - Control goes to CDocument::OnFileSave in doccore.cpp - From there it goes to DoFileSave() - From there it goes to DoSave(NULL) I would want the Savedialog to be displayed in my application and let the user choose where to save and the name to save. I have this class CHDUDoc.cpp and I have this method which tries to override OnFileSave(). I just have these lines of code in my method, BOOL CHDUDoc::OnFileSave() { AfxMessageBox(_T("Right here")); //OnSaveDocument(lpszPathName); return TRUE; } But this method never gets triggered, instead it always goes to the doccore.cpp file. Thanks for your time!! ...Show All
SQL Server Change the date format of a smalldatetime column.
Hello people. Please, is there any way to change the date format of a smalldatetime column of a table in SQL Server Express What I mean is that the default date format for a column which type is smalldatetime is "MM/dd/yyyy" but I'm developing a localized application and the date format that I would like to use is "dd/MM/yyyy", so I would like to know is if there any way to change this. I know that I could write some code in my application in order to do the conversion, but I would like to avoid this because I'm using the databinding property of the control and if I have to write a piece of code in order to do the conversion, I will loose this functionality. I'm currently using WindowsXP SP2, SQL Server Expr ...Show All
Visual Studio 2008 (Pre-release) How should I wrote method that will return ArrayList?
Hello. I would like to add method to WCF service that will return ArrayList of custom objects. What attributes should I add to this method to make it possible I'm using .Net Framework 3.0.04324.17 (ReleaseCandidat AFAIR). //Here is class that will be inserted into ArrayList [DataContract] public class IDTitle : IIDTitle { public IDTitle() { } public IDTitle(object id, string title) { _id = (long)id; _title = title; } private long _id; private string _title; [DataMember] public long ID { get { return _id; } set { _id = value; } } [DataMember] public string Title { get { return _title; } set { _title = value; } } } //Here is service interface [ServiceContract] public interface ISpeedo { [Op ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed vs Unmanaged, Primitive design and .NET
I actually have three separate questions here. Please bear with me. Managed vs Unmanaged I searched several post and didn't find the answer I was looking for. Simply put, if you are designing a 3D game engine that needs to push 30+ frames a second, would you even consider using a managed language It seems to me that when the garbage collector kicks in your frame rate will/may plummet. What is the concensus on using managed vs unmanaged code in a game engine Primitive Design I have built a rudimentary 3D engine using good OOD where the primitives (points, polygons, lines, etc.) provide methods for their management and transformations. If I have a model with 100,000 points, each point carries the overhead of the virtual function table and ...Show All
Visual C++ How do you create a pointer to class funcitons (not members)?
Hey, I was jsut wondering, how do you create a pointer to a function that is a member of a class Note that I don't want to make a pointer to member, I just want to be able to do something like this: class ClassA { public: void SayHello() { MessageBox(0, "Hello", "", 0); } }; int main() { ClassA a; void (*ptr)() = a.SayHello; // this would be how i would suspect it to be done ptr(); } How do I acomplish this This would work if the class function is static. The problem is that your pointer knows naothing about the object you want to use. Hopefuly I didn't made a syntax error... (the syntax is horrible) class ClassA { public: void SayHello() { MessageBox(0, "Hello", "", 0); } ...Show All
.NET Development IP Address Range Array question
I know this should be easy, however... im building a small scanner and wanted to create an array of some sort to scan all addresses in the range of textbox1 and textbox 2 i have been reading about arrays and have tried to contemplate how one should be setup for this and cant figure it out.anyone know of any tutorials or sameple code where this is done Not looking to be spoon fed, just tryin to get a grasp on vb2005 this is what i have now in vb6, mind you, the code and logic are all incorrect right now, because im working on it right now, i will be doing this in vb express and yes, im a damn code noob..thanks [code] '---------FIRST IP SPLIT--------- ' Dim start1, start2, start3, start4 As Integer star ...Show All
Visual Studio 2008 (Pre-release) ServiceHost connection number problem
Hi, i try to create one simple WCF application. For hosting my services I use ServiceHost class. The problem is that i can not create more then ~10 connection. After restarting the "Host" application others ~10 connection will be supports. It seems that the request not even gets to service. How can i resolve it Thanks What is your binding If it's NetTcpBinding then you are hitting the MaxConcurrentSessions throttle. http://windowssdk.msdn.microsoft.com/en-gb/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentsessions.aspx I am using wsHttpBinding. Thank you. ...Show All
Visual C# Obsolete System.Net classes.
Im trying to run this snippet using System; using System.Net; class showIPs { public static void Main( string[] args ) { string name = ( args.Length < 1 ) Dns.GetHostName() : args[0]; try { IPAddress[] addrs = Dns.Resolve(name).AddressList; foreach( IPAddress addr in addrs ) { Console.WriteLine( "{0}/{1}", name, addr ); } }catch( Exception e ) { Console.WriteLine( e.Message ); } } } but I keep getting the following error :( c:\c-sharp\arr.cs(10,30): warning CS0618: 'System.Net.Dns.Resolve(string)' is obsolete: 'Resolve is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/ linkid=14202' I went to the link.. I just dont understand how to fix it. As far as I know.. I think I ...Show All
Visual Studio Express Editions what day in week?
how do detrimen what day it is .. monday, tuehusday, etc.. or with an integer with 1 = monday 2 = tuehusday ... hehe just a way do deside the current day in the week . thanks :D oh i see :) .. thank you verry much xD emm .. you should not know what could result in that when i add a label or anything to my current project in VB2005 express and then start debugging i cant see the new label button etc :S ...Show All
