i'm using mssql server express edition like server with a internet connection.
i wanna connet my database remote machine which have internet connection from anywhere for only select statement.
But i dont wanna using ISS.
how can i solve this??
i've also had to set a specific dynamic port for all ip's.
In SQL Server Configuration Manager choose SQL Server 2005 Network Configuration and Protocols for server name (default SQLEXPRESS).
Now choose TCP/IP and in IP Addresses tab in IP ALL set TCP Dynamic Ports to something else.
If your SQL Server is on pc which connects to internet thats all, if not you must direct chosen port to your pc with SQL Server (it's IP adress in LAN)
If  and  match like this example i want to pass subitem(blahblah) to listview1.subitems and calculate 21:44:21 - 19:24:20 to get the work time like this example are 2:20:01 and pass that to listview1.subitems.
Can you help me get started?
This is my first program and i have to be finished this week
I have googled and searched in the internet but i don´t find out how to compare.
It depends on whether or not you are comparing strings or the date/time values. With strings you can obtain the item's text (Item[n].Subitems.Text) at that desired index (n) in each of the the listviews. Then compare the strings.
if( String.Compare(str1, str2) == 0)
// do something useful...,
if (CultureInfo.CurrentCulture.CompareInfo.Compare(str1, str2,
CompareOptions.IgnoreCase) == 0)
// do something useful...,
If you are checking the date/time. You need to convert the string to DateTime format then check it using:
when items adds in listview1 it gonna compare subitems and  with subitems and  in listview2. if they match, pass info listview2.subitems to right item in listview1 and calculate the time... and remove that item in listview2!
How would you do??;P (some code strip)
even hard to excplain!
Appriciate this man!!!
I understand what you are trying to accomplish. You should read up on the properties of the ListView control. When you fully understand the properties you will have no problems accessing and manipulating ListView strings.
The Items collection contains all the indexed items (0,1,2, etc), each Item can have SubItems (0,1,2, etc). For example, suppose I want to get a filepath from the ListViewItem that I have found. The path is the second subitem and the filename is the first subitem.
Now that I have the string I can do something with it (Compare!?). Be careful when iterating through lists and indexing items. If the you try to access an index that is more or less than the "Count" property of the ListView. It throws an System.ArgumentOutOfRangeException error.
I have a problem with SqlServer 2005 Log file .
I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error.
I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error:
"Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)".<br />
Could not open new database 'DbName'. CREATE DATABASE is aborted.<br />
Cannot attach the file 'FilPath.mdf' as database 'DbName'.<br />
File activation failure. The physical file name 'filpath_log.LDF' may be incorrect.<br />
The log cannot be rebuilt when the primary file is read-only.'
I wonder to say sometimes attachment works but sometimes not.
I already did this attachment process with SQLServer 2000 and it never gives me error .
I am new to programming and just started learning C#. I am using Visual C# 2005. I am working on a project where the user enters 5 digit # and then I need the digits to display separated by a space. This is a console application.
I got as far as asking to enter # then displaying the digits by using / and %. I am having a problem showing the 2nd, 3rd and 4th #.
How do you get the just the 1st digit to the right of the decimal to show. I used for example:
will give you the remainder when dividing by 10000. In essence, this means it will give you the last four digits. To get just the one digit, you'd also have to strip to the right, so something like this should work
Math.Floor((value1 % 10000)/1000)
The mod (%) strips values to the left, then the divide strips to the right. Finally, Math.Floor stops a result such as 3.6 from rounding up.
You don't need to use int.TryParse or char.IsDigit, as you know the values are all numbers. You DO have to make sure your number is 5 digits long, I'd be inclined to store the values in a list or an array, then you can write code that works with any length number.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Essentially, I want to press a key while running my application and have something happen.
Let's say I have Form with 3 TextBoxes named tb1, tb2, and tb3. What's the best way of setting things up so that when I press '1' tb1 is focused, '2' tb2 is focused, and '3' tb3 is focused. I know I can set up KeyPress events for tb1 AND tb2 AND tb3 to do this, but that seems very redundant. Is there a way where, no matter who currently has focus, I can press '1' and give tb1 focus? Thanks for the help, sorry, I'm new to C#.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Sep-23 16:22