Lukasz Tarkowski's Q&A profile
Visual Basic How to Find last record in a database
How can I find the last record (row) in a database I am developing a VB 2005 program that must read a sql database and find the last record so I can retrieve the last "Batch Number" used. This will then be incremented and the new "Batch" record will be inserted into the database. I can't find a SQL command that will work except to read each record until the EOF. Can this be done Thanks, Ron Thanks for the post. I will give this a try also. I'm still searching for the best way, so i will compare and see which is more effiecent. Ron ...Show All
Windows Forms who have sample drag and drop from treeview to listview?
I want it. And this listview can reorder with its listview_dragenter, listview_dragdrop, listview_itemdrag, listview_dragover.(4 available subs) How can I use this listview to receive a treenode from a treeview. Thanks, PS:I'm using vb.net2005 My code: Private Sub TreeView1_ItemDrag( ByVal sender As Object , ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles TreeView1.ItemDrag DoDragDrop(e.Item, DragDropEffects.Copy) End Sub and: Private Sub LstFavorites_DragEnter( ByVal sender As Object , ByVal e As System.Windows.Forms.DragEventArgs) Handles LstFavorites.DragEnter If e.Data.GetDataPresent( GetType (TreeNode)) Then &&& return type of e is Drag ...Show All
Visual Studio Team System Setting up Project Alerts by Project Administrators
It looks to me that project alerts are set by individual users in such a way that if a developer wants to be alerted for any new work items assigned to him/her, he/she will have to set it up on the client he/she is using. Is there a way for project administrators to set up project alerts For example, when a work item is assinged to a user, the user will receive an email alert even if the user has not set up project alert himself. bissubscribe tool available at %programfiles%\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\BisSubscribe.exe on the server. For the GUI tool, probabaly it was hard to see the link at end. Here is direct link: http://blogs.msdn.com/narend/attachment/679440 ...Show All
SQL Server My Query is broken and I don't know how to fix it...
I am trying to set up a filtered paging ObjectDataSource for a gridvoew control. My code works, my query doesn't... This is OK: Get all rows of data: "SELECT UCO, country_code, country_name, enabled, concurrency FROM CountryCodes " Returns all records as expected This is OK: Getting rows of data with no Filter: "SELECT UCO, country_code, country_name, enabled, concurrency FROM (SELECT ROW_NUMBER() OVER (ORDER BY country_name ) As Row, UCO, country_code, country_name, enabled, concurrency FROM CountryCodes ) As TempRowTable WHERE Row >= 0 AND Row <= 10" Returns expected data This is OK: Making sure my WHERE filter works: "SELECT UCO, country_code, country_name, enabled, concurrency FROM CountryCode ...Show All
Visual Studio Express Editions Print Previewing the Form
I did some research on Print and Printpreview for my form. They did work, sort of. It printes a blank page or in the preview it says: 'Document does not contain any pages.' I tried setting the size in the CaptureScreen() to the size of the form. memoryImage = new Bitmap (684, 559, mygraphics); //this is the size of tabPage1 Any suggestions Here's the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace InvoiceReceipt { public partial class Form4InvoiceReceipt : Form { public Form4InvoiceReceipt() { InitializeComponent(); } [System.Runtime.InteropServic ...Show All
Windows Live Developer Forums Translation problem
In English when "[someone] is typing a message." appears, the translation in Slovenian is correct, like this "[someone] pi e sporo ilo." But when in English appears " [someone] is handwriting a message.", the translation in Slovenian is the same, but it has to be" [someone] ri e sporo ilo." ...Show All
Windows Forms validate password
I have a password field in my login page (ASP.NET 1.1), how can I validate password based on at least 6 characters, one number, and one capital letter. Hi Jim, You should a Regular expression to verify the password. An example of what you need can be found here (c#): http://weblogs.asp.net/erobillard/archive/2004/09/29/235889.aspx The example uses Microsoft's defintion of a strong password: at least seven characters long contains at least one character from each of the four groups: uppercase lowercase numerals symbols found on the keyboard. With a few changes, you can change the sample to match your needs Hope this helps, ...Show All
Visual C# Getting shortcut properties
Is it possible to get the values of properties from a shortcut that launched an application I've created a shortcut for an application and after right clicking on it and selecting "properties" I can see there are several items in the "shortcut" tab. What I'd like to be able to do is get the value of "Run:" in the application, so I could get it to start either normally or minimised. Is it possible to read these values Thanks, Stu not sure I quite follow. You would need to implement the IWSH interface to read desktop shortcuts.... if you are trying to pass arguments into your application, then this would be better than to read the shortcut and checking to see what the shor ...Show All
Visual Studio Team System Team projects placed in folders
Currently in our development environment using VSS we have the following structure: $\ Databases Documentation Legacy Projects Folder1 Project Project Project Folder2 In this structure the Project best equates to a Team Project. We currently have VSS laid out just as the folder structure on the drive. We’d like to keep this structure going forward with TFS. This provides us a way to organize each of the team projects and the source control. Also it prevents every developer having to create a workspace and set up the root of the folders for every project/folder in the workspace set up. ...Show All
.NET Development How can I create this XML...?
I have a problem with an XML file(File1)..I need to know how the belove XML can be created.I mean, what is the relationship In my opinion, A is the dataset name,B is the master table and E is the detail table. I have wrote a test program to try this.I added a typed dataset,created two tables and added a relationship between one of the columns of these tables,added some data to the tables and wrote the file to the XML. The resulting file is File2. I wish you have seen the difference between them.I want a file like File1.How can I do this Thanks in advance. -----------------------File1---------------------------- <A> <B> <C>Cdata</C> <D>Ddata</D> <E> <F>Fdata1</F> <G>Gda ...Show All
Visual C# Class/Method views in c#
In vb .net under the page tabs it has two drop down boxs. 1st for classes (listbox, page events, etc...) 2nd is the methods (rowdatabind, click, doubleclick, load, etc...) How can I get that to show in c#. I'm using VS 2005 Professional. I can't find it anywhere. thanks rich omg! now I know why it disappeared... I read another article about slowness and it said to remove navbar's and this was about 2 months ago. I've been working in vb .net so never paid any attention to it until today... thanks for your help... I'm a loser for not picking that up.... lol :) Happy New Year! ...Show All
Visual Studio Express Editions cannot switch to debug-mode
Hi everybody, in my VS C# 2005 Express I cannot switch to debug-mode any longer. The respective pull-down in the toolbar is shadowed and the menu-entry for the configration-manager is not available at all. What has happened Thanks for you help. Regards, Holger. Yihaaa!! :-)) Thumbs up! Thank you. Best regards, Holger. Figo Fei - MSFT wrote: Otherwise, Can you go to Tools, Options menu, Project and Solutions, General section and check the "Show Advanced Build Configurations" checkbox Pls feel free to let us know, thank you ...Show All
SQL Server Check if a windows/nt user account exists
I have some script which creates/grant priveleges to windows/nt users to DB but i frequently get the message below: Windows NT user or group '<user or group>' not found. Check the name again. I understand that this is because the said user/group is indeed not present in the environment I'm running the script (ie. testing and production environment). But is it possible to have some sort of checking whether the user/group exists in the environment so that I could determine whether or not to call some lines of code Not sure if this is possible so i had to ask. c",) SELECT * FROM sysusers will show the users from the current database. There are columns like isntname ...Show All
Windows Live Developer Forums Due to a connection problem, changes you make might not be applied to other computers you use
Hi, Due to a connection problem, changes you make might not be applied to other computers you use I am getting this error in Live Messenger for last few days... As a result, my contact list is not appearing correctly and all the contacts are missing. Anyone having same issue Thanks Fahad Fahad Habib wrote: anyone with any answer or solution it seems we need to switch back to version 7.5 for the time being.... The same thing is happening to me too. How do I switch back to version 7.5 while it all gets sorted ...Show All
Visual Basic Sound
How can I play a sound without the user seeing a media player Dim zSystemSound As System.Media.SystemSound = Media.SystemSounds.Exclamation zSystemSound.Play() Dim zSoundPlayer As New Media.SoundPlayer("C:\ MySoundFile .wav ") zSoundPlayer.Play() ...Show All
