|
I put a Stop in my code so that I can view the contents of a local datatable. Is there a way to view the data in a datatable in a browse window, like an excel spread sheet allowing you to see all rows and columns at once?
|
|
|
|
|
I'll assume by Stop you mean a breakpoint...and if you have visual studio 2005 then it is pretty simple. All you have to do is set your breakpoint to stop sometime after your datatable has been filled, when it hits the breakpoint highlight the table name in your code and then hover your mouse over it. When a little icon appears that has a magnify glass, click on it. A popup will open that displays your data in a nice grid. Another way is to highlight the table name, right click and select QuickWatch. There you can click on the magnify glass icon at the top of the list of properties to look through. If you do not have visual studio 2005 I don't know of a nice way to view the data, short of writing some code to output it to a csv file to view in excel.
|
|
|
|
|
Hi does anyone know if there are problems with microsoft at the moment. all of a sudden when I enter the dataset configuation I'm getting thrown out and now it's even happening when I try and edit the dataset. various prompts including "microsoft has come encountered a problem and needs to close.
I've checked the problem and seems to be APPCRASH.
Can anyone help me please?
Nala
|
|
|
|
|
hi everyone,
i have a listbox which contain some item .now i want to change the content of selected item with new string as shown below
lstCaptionStructure.SelectedItem.ToString.Replace(lstCaptionStructure.SelectedItem.ToString, NewString)'lstCaptionStructure is list box
but above code does not work.can any body tell where i am wrong or how can we change the some or full part of selected item with other string ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi,
if you have a collection of things and want to replace one of those things, you must
operate on the collection, hence something along the lines of:
lstCaptioStructure.Items(lstCaptioStructure.SelectedIndex)=NewString
Items is the collection here.
BTW this code would bomb if nothing is selected (as would your code)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
thanks luc ,
its work
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
http://www.codeproject.com/cs/miscctrl/winwordcontrol.asp
I am using this control in my application. It works fine for the first time but every time after that (until we exit application and restart it ) instead of loading word inside the control it is loaded as a separate application. i have debugged the code (load document method) many times but there is no problem and all statements execute fine. one change i have made in the code is the closecontrol method and the change is
public sub closecontrol()
Dim dummy As Object = Nothing
Dim rcw As Object = Nothing
If wd.Documents.Count > 0 Then
wd.Documents.Close(dummy, dummy, dummy)
Marshal.FinalReleaseComObject(wd.Documents)
End If
wd.Quit(dummy, dummy, dummy)
rcw = wd
wd = Nothing
Marshal.FinalReleaseComObject(rcw)
deactivateevents = False
document = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
wd = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
end sub
i call this method when closing the form on which this control is placed.
please let me know if you have any idea about this problem
Salman Sheikh
|
|
|
|
|
Salman Sheikh wrote: http://www.codeproject.com/cs/miscctrl/winwordcontrol.asp
Go to that article and ask the author for help. There is a message board at the bottom.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Use VB2005
I have "Class1.vb" and "Form1.vb", "class1.vb" contain in my Text and want to show in "Form1.vb" ,How to implement it?
thank you
|
|
|
|
|
your question seems to be unclear .. please ask clearly what you want to do
Salman Sheikh
|
|
|
|
|
Sorry, I contain text in class1. and how to get text form class1? now i working in Form1
|
|
|
|
|
if u mean u want the text in the label to appear on the form caption, then you say
form1.text = label1.text
if u want the file under the solution explorer called form1.vb to be called class1.vb then make sure u change the one thats called class1.vb currently to something else then click form1.vb and rename it to class1.vb
otherwise if thats not wat you want to do then u need to re-phrase your question and make it a bit clearer, its a bit confusing
|
|
|
|
|
First of all, give your classes meaningful names. Then, it depends. Is code being called in the class, which needs to send text to the form ? Use a delegate in this situation, the odds are that the class does not contain an instance of the form. If the form is being called and needs to pull the text, then myTextBox.Text = myClassInstance.TheText will do it, where TheText is a property you define. You could also return it from a method, if this is appropriate.
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 )
|
|
|
|
|
Hi guys,
I am writing a system that should connect to varied database systems (currently MS SQL 2000, 2005 and MySQL). I decided to use Oledb.net provider for my connections. For the different versions of MSSQL it works fine but I am having a problem trying to run commands on MySQL connection. I got the following connection string from the net
Dim myCommand As New OleDbConnection("Provider=MySqlProv.3.0;Data Source=th911;User Id=root;password=root")
From my analysis of the connection string there is no database name (Initial Catalog). How then does MySQL know the database i am interested in or how can i make it known without having to enter the credentials every time i open the connection?
Thanks for your assistance guys.
-Mbire-
I can resist everything else except temptation...
-- modified at 8:24 Monday 10th September, 2007
|
|
|
|
|
Mbire wrote: How then does MySQL know the database i am interested in or how can i make it known without having to enter the credentials every time i open the connection?
You will need to specify the database name. http://www.connectionstrings.com[^] has many different database connection strings that you might find helpful.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
What is there to elaborate? The value of the townId is in the ComboBox's SelectedValue property. That's the value that you update the Person's record with.
Where's the problem?
|
|
|
|
|
Helo dear!
I want to install two projects and two third party softwares with one setup programme. want to start one project wait to complete then start another but fails. please help me.
I will be grateful
Julian
|
|
|
|
|
I have an mdb file that has vb code in my PC. I want other users to use it from their PCs'. But a copy the file should not work on their PCs'. I can not check it with any hardware ids' because each instance would run diffent h/w ids in different PCs'. What else is left for me as options?
|
|
|
|
|
you can split you're mdb file into a front-end and a back-end
front-end would have linked tables and forms and everything else
back-end would have only tables
an other option is terminal server (if you have the funds for it) but then you have the problem of locking and still need the front-end and back-end solution
an other option is just put a shortcut to the mdb on the netwerk on every pc but once again problem with locking can occure here
as to restricting the users from copying the file that's probably going to require permisions settings on the OS (not shure about it since I haven't tryed it)
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Thank you TD. I want the file residing only in on machine and I have it ready. Now I want it to be accessible from any PC in the n/w. But that file should be coded in such a way that it will work only in my PC. A copy of the file should not work in any other PC. But others could access my copy over the n/w. While a person access it remotely the new instance should generate an ID specific to my PC. But Hardware IDs' are generated on the PC's h/w that access it so i can not use those.
If I could detect all the pc's in the n/w by hostname or IP that also would help. So that I can track whether the access is through n/w or is it a direct access.
Thank you once again.
|
|
|
|
|
tonymathewt wrote: If I could detect all the pc's in the n/w by hostname or IP that also would help
I wouldn't exactly know how to do what you want but I can give you the .net code to detect all pc's in the n/w (at least by tommorow I can normally get it) but I don't think it wil work in access
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
How to retreive the Application path. For eg. d:\MyApp\ is the main dir. which contains sub dirs like Templates, bin etc.
<br />
My.Application.Info.DirectoryPath Gives me d:\MyApp\bin\Debug
I want is just d:\MyApp. I don't want to hard code it as user may have different path. Any idea, how to retreive it.
Thanks
Terry
|
|
|
|
|
My.Application.Info.DirectoryPath gives you the path of the application folder. When you are running the code from Visual Studio, you get a path like "d:\MyApp\bin\Debug". This is the application path, and if you try to get outside this folder, it won't work when you deploy the application.
If you have files in your project that you want in the application folder, show the properties for the file, and change the "Copy To Output Directory" property from "Do not copy" to "Copy if newer".
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks Guffa,
I want to access MyApp\Templates dir while run time. It contains files in it. The TEmplates folder is not added into the project.
So how do i end up retreving it in the app. at run time. Is ther any other way to get path of MyApp? Should I copy the Templates folder into the Debug folder? Can you please give me a direction to achieve the goal. I am using VS 2005.
Thanks
Trupti
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: I want to access MyApp\Templates dir while run time.
No, you don't. That path will not exist if you deploy the application without including the files in the application folder.
Trupti Mehta wrote: The TEmplates folder is not added into the project.
That is the problem. Follow my instructions in my previous post.
Trupti Mehta wrote: Should I copy the Templates folder into the Debug folder?
That's done automatically when you mark the files to be included in the application.
Trupti Mehta wrote: Can you please give me a direction to achieve the goal.
I already did. If there is something that you don't understand about it, you have to say so.
---
single minded; short sighted; long gone;
|
|
|
|