Krutika's Q&A profile
SQL Server Get the ID to start from 1
I have a sql-database with one table and in the table there are now around 70 rows... I wonder if its possible to "delete" or "remove" these rows so that the ID (the primary key) start to increase from 1 again....or am I forced to create a new table (and delete the one who exists now) to get the ID to increase from 1 again .... Tigers21 wrote: I have a sql-database with one table and in the table there are now around 70 rows... I wonder if its possible to "delete" or "remove" these rows so that the ID (the primary key) start to increase from 1 again....or am I forced to create a new table (and delete the one who exists now) to get the ID to increase fro ...Show All
.NET Development tcplistener and guest login
This is the source file that i am having trouble with. When the user is logged in as guest (built in account guest) the ListenToServer function isnt accepting connections. I tried to impersonate the administrator, everything works fine if logged in as an admin. Please take a look and see what i am doing wrong using System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; using System.Net; using System.Net.Sockets; using System.Threading; using System.Runtime.InteropServices; using System.Diagnostics; using System.Security.Principal; namespace client { static class Program { [ StructLayout ( LayoutKind .Sequential, Pack = 1)] ...Show All
Visual Studio 2008 (Pre-release) Cannot access a disposed object. Object name: 'Transaction'
Hi, I have created a website using blinq. when i tried to create a new record in my database i got the following error: "The partner transaction manager has disabled its support for remote/network transactions the partner transaction manager has disabled its support for remote/network transactions ” I applied the solution provided on the link: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=230390&SiteID=1 and after that this problem resolved and now I am getting the following error: “Cannot access a disposed object. Object name: 'Transaction'” Any idea Thanks, Hi Matt, I've been following your work through object spaces and comega, great work on ...Show All
Visual C# Cast <IList>
I have something like this... public static IList < AbstractKeyValueEntity <T>> Values<T>( ListBox listBox) { IList < AbstractKeyValueEntity <T>> results = new List < AbstractKeyValueEntity <T>>(); foreach ( ListItem item in listBox.Items) { if (item.Selected) { results.Add( AbstractKeyValueEntity <T>.GetLookupByEntityID(item.Value)); } } return results; } I make a function call something like this something is of type IList something = ( some ) CallFunction .Value< some >(DownList); I get an error saying Cannot implicitly convert type ''some' to 'System.Collections.IList'. An explicit conversion exists (are you m ...Show All
SQL Server Duplicate Records
Hi, Not so sure how simple this question is but here is what happened. I installed SQL Server 2005 on a new Win Server 2003. I exported the tables and their data from the old machine to the newly established database on the new machine. It looks like all my records were duplicated. When I try to delete one of the duplicates it won't work because both rows are effected. I can't set my primary key now and if I try to create a new database with the primary key already set than the import fails. Any one run into this before or know what's going on Any help ASAP would really be appreciated. Thanks, Alice I tried the SELECT DISTINCT approach and copied the records into a new table. It seemed to work, but everytime I try ...Show All
Visual Studio Express Editions Making a textbox into an array and reading from each point in the array
I'm trying to build a name generator, that takes a letter from one point in an array, (Which originally comes from a textbox), and changes that letter to some other character. So for instance, if i put the name "Sam" in textbox one and clicked the "Generate" button, the out put, (Which has random keyboard typings of each letter, like S as "Ess" or "$") would go to textbox 2. So basically i want to build a name generator for The "Leet" or "L33t" Language. What i need to know is: 1.How to assign the Data of Textbox1 to a String array 2. How to read from each point in this array and 3. How to set the output to go to a certain point in an array for textbox2. Any help would be greatly ...Show All
Visual Basic What would you like too draw on the form?
Hey you! I want to draw something on to a form but i don't want to use onpaint() method. I don't know how do i do Please help me if you can! Thanks very much! dvl_vn @ Ghaby I haven't played around with it yet, but the XNA Framework is perhaps something you could look at - it's a 3D game-creation tool but 3D games are basically " running around in a 3D map " so it may offer you an easy and far more powerful way to take your map tool into the third dimension (2D is of course also part of that). See the XNA forums in the index for more info: http://forums.microsoft.com/MSDN/default.aspx ForumGroupID=20&SiteID=1 ...Show All
Visual Studio Tools for Office CommandBarButton.Picture generates COMException
Hi All, I'm trying to set the Picture property of CommandBarButton but it generates a COMException with error code -2147467259. Following is how i'm defining the button and adding icon to toolbar. Connect() { ......... object omissing = System.Reflection. Missing .Value; btnCmd = (OFFICE. CommandBarButton )oCommandBar.Controls.Add(1, omissing, omissing, omissing, true ); btnCmd.Caption = "Test Button" ; btnCmd.Style = OFFICE. MsoButtonStyle .msoButtonIconAndCaption; WordAddinAxHost axHost = new WordAddinAxHost (); Image image = Image .FromFile( "C:\\icons\\Image.bmp" ); IPictureDisp disp = axHost.IPicDisp(image); btnCmd.Picture = disp; (Exception generated here) .......... } public class W ...Show All
SQL Server Import and Export Wizard: Did they try it out before they shipped it!!!???
I have an excel file that, at least to me, is pretty simple. It's got 8 tables with about 25 records each. I'm trying to import 2 of those tables. Everytime I try to import I get this message: Column "Name" cannot convert between unicode and non-unicode string data types. So I've tried every combination of import/export that I can think of here and stil I get this message. Now I really don't think that I have any oddball characters in my data. As a matter of fact there isn't even any punctuation in there. And yet, SQL thinks there's some unicode in there. My dest column type for Name is a varchar(max). No issues there. So this is really about the simplest sort of data transfer that I can think of. And yet it doesn't ...Show All
SQL Server Concatenating Fields With NULL Values
Hey everyone, This is probably a very simple question, but I am just stumped. I am storing different name parts in different fields, but I need to create a view that will pull all of those fields together for reports, dropdowns, etc. Here is my current SELECT statement: SELECT m . FName + SPACE ( 1 ) + m . MName + SPACE ( 1 ) + m . LName + ', ' + m . Credentials AS Name , m . JobTitle , m . Company , m . Department , m . Address , m . City + ', ' + m . State + ' ' + m . Zipcode AS CSZ , m . WorkPhone , m . FAX , m . Email , c . Chapter , m . Active , s . Sector , i . Industry FROM tblMembers m LEFT OUTER JOIN tblChapters c ON ...Show All
SQL Server Date lookup in SSIS
How do I perform a date lookup in SSIS. I have a date with time component in it. This has to be looked-up with a table that contains only a date element. Vijay: Suresh's suggestion should have worked for you. The conversion statement will look something like this: CONVERT( varchar, <table>.<datetimevalue>, 101 ) The "101" means to convert it to a string in US date format: mm/dd/yyyy CONVERT supports a number of arguments for the output string -- lookup CONVERT in Books Online to see what I mean. As Suresh suggests, you'll probably have to convert the columns in both tables to do the comparison. ...Show All
Visual Studio Express Editions This is puzzling, well it is to me?
I open MSWord and create a document with formatted text Red, Blue, underline etc I then copy it to the clipboard, then paste it in to my program where it appears with exactly the same formatting as it had in word, so far, so good. I now switch back to MSWord and save the document, back to my program and open the document but now all the formatting has gone, so it must be the way that I am opening the document is wrong. Here is the code that I use, already been posted in another thread, but I feel it's better to keep all info in the same thread. Case "doc" objWord = CreateObject( "Word.Application" ) objDoc = objWord.Documents.Open(OFD1.FileName) objDoc.Select() rtbText.Text = objWord.Selection.Text objDo ...Show All
Windows Forms question of DoubleClick on ListView in C#,need help!!!
Hi, does anyone know to write the C# codes on how to create a double click event for ListView to delete/remove the item that i select from ListView control Edit: Very Good Aproach Here: http://msdn2.microsoft.com/en-us/library/ms172533.aspx Best Regards, Rizwan aka RizwanSharp There is no double click event in compact framework. You can do a trick by using a Timer. See this Post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=732678&SiteID=1 I hope this will help. Best Regards, Rizwan aka RizwanSharp ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Building The MC2 Editor while being Newb.
In advance, sorry for my ramblings. Okay I am making this post because I have run into multiple problems while attempting to build the MC2 Editor, though there are topics on some of the problems I have had, none of them either answer all my questions or are "Newb friendly" as it where. The primary reason for me rebuilding the Editor Is that the current edditor has some bugs, namely crashing after trying to Edit Mech unit Information. There is a solution for this here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=351287&SiteID=1 But I cant acctually put the solution to use since I cant build. Here are the various things I have tried in order to build the editor (Please post telling me what I ...Show All
Visual Studio Team System Proxy Configuration for Dummies
Hi, my coworker and I just can't get the proxy setup straight. I started a test setup where I have one TFS and one client. The client can connect directly to the TFS without a problem, now I want to do the same, but use a proxy (we will later do this between remote locations with a slow connection). I have some really basic questions and I guess I just did not understand how exaclty the proxy works. a) Where do I have to install the proxy portion (the setup in the proxy folder on the TFS CD) I assume that this goes on the machine that is the client to the actual TFS server. Like this: TFS Server ----WAN connection---- Proxy &Client (VS2k5) on same PC Correct b) In the proxy.config file, is it correct to enter the name of the ...Show All
