|
Hi, Please forgive me for the simplicity of the question, and the redundancy. I have searched the forum and believe my answer is out there amongst the multiple dataset question/responses, but I am such a newbie that I am having trouble putting together the information I need...Ok, enough, here's what I am trying to do:
I am making a call to a third party API that returns a dataset. I need find out if there are any rows returned, and if so pull out the data from a couple of the columns...
More specifically, I get the dataset. Each row contains many columns, the three I need to get are BuySell, ControlValue, and Price.
Can someone toss out to me the simple code for traversing through the dataset and pulling out the values from these columns.
Many Thanks -
Jennifer
|
|
|
|
|
I am trying to add dynamic drop down menu in my office com addin
toolbar. I use control array for drop down menu, but
I can only get the event for the first one instead of each menu item
how can I fix this so that events can be generated in each menu item
Dim WithEvents cbeButton As Office.CommandBarButton
Dim cbcButton() As Office.CommandBarButton
private sub CreateMenu()
for i = 0 to 3
ReDim Preserve cbcCatalogButton(i)
cbcButton(i).caption = i
set cbeButton = cbcButton(0)
next i
end Sub
Private Sub cbeCatalogButton_Click(ByVal Ctrl As Office.CommandBarButton, _
CancelDefault As Boolean)
msgbox "hello"
end Sub
|
|
|
|
|
I have added a reference for sqldmo.dll to my project and i am succesfuly using the com interop to script my database objects. But, when i am deploying the project to another pc with win2000 i receive the following
error :
"COM object with CLSID {xxxx-yyyy-......} is either not valid or not registered"
What am i doing wrong?
thanks in advance.
G.
|
|
|
|
|
Hey
I need to trim 4 characters off the right hand side of my string and am having a little trouble doing so.
For example "Hello.doc" becomes "Hello"
I could use split at "." but this wont stay constant if there is a "." in the filename itself
Thanks for your time
chris
|
|
|
|
|
Hey, Chris. You could try:
dim s1 as string = "Hello.doc";
dim s2 as string = Left(s1, Len(s1) - 4)
Or, if you're dealing with file/path names and want to extract portions of it (say just the filename, or just the extension, that sort of thing) have a look at the System.IO.Path class.
|
|
|
|
|
Hi, I might have the similar question too. I use an OpenFileDialog for user to select the file and they select TheFile.doc, How could I know that user select file extension with .doc? Can you help that? Because I want to check the 4 character from the right side.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hey,
Thanks Mike, i will try that.
The man from .... you have to store the filename from teh openDialogBox and use the code that mike has said.
Hope this helps
Thanks
Chris
|
|
|
|
|
Hi, I'm KUMARAN KALIDAS
First I would like thank to all the ppl behind the codeproject, coz it really help me in terms developing a .net application with various examples..thank you again..since i'm new developer for the .net environment.
I need a help, in order for me to use a datagrid control in my visual basic.net project. I would like to use datagrid as a data input screen rather than using it to display data.
How can use datagrid control as transaction input screen which contain validation as well.
I would appreciate if anyone could help to provide me with a sample source code..I hv search tru msdn for .net but the sample was almost for data display purpose only.
thank you guy's for code project
kumar
|
|
|
|
|
First of all you must consider the following:
are you using sql connection or an OleDbDataAdapterconnection.
The difference with the two is the coding and where the port is located.
I am thinking that you're on the MSAccess database which you will need to use the OleDbDataAdapterconnection for your project.
Using the MSAccess database you must first create a blank database through Access. Open your Access database, click on Blank Table, and click on the design view this will take you to the tables configuration. You will see a number of fields. In the Field Name you will input all your information about what you want to create in a datagrid. E.G. Addresses in the Field Name you will input "First Name, Last Name, Address, City, State, Zip Code, Telephone Number." For each field you will single click to select them then you will go down and validate your entry. Email me to give a good perspective of how to create the database and use the datagrid in vb.net.
bravo659
|
|
|
|
|
Can anybody tell me how to list a network drive in a TreeView?
I currently list my drives this way:
Dim driveList() As String<br />
driveList = System.Environment.GetLogicalDrives()<br />
treeDirStructure.BeginUpdate()<br />
Dim x As Integer<br />
For x = 0 To driveList.Length - 1<br />
Dim tvn As New TreeNode<br />
tvn.Text = driveList(x)<br />
Select Case GetDriveType(driveList(x))<br />
Case DRIVE_REMOVABLE<br />
tvn.ImageIndex = 0<br />
tvn.SelectedImageIndex = 0<br />
Case DRIVE_FIXED<br />
tvn.ImageIndex = 1<br />
tvn.SelectedImageIndex = 1<br />
Case DRIVE_CDROM<br />
tvn.ImageIndex = 2<br />
tvn.SelectedImageIndex = 2<br />
Case Else<br />
tvn.ImageIndex = 0<br />
tvn.SelectedImageIndex = 0<br />
End Select<br />
treeDirStructure.Nodes.Add(tvn)<br />
Next x<br />
treeDirStructure.Nodes.Add("C:\Targets")<br />
treeDirStructure.EndUpdate()
..but I can’t figure out how to list a network drive or other things like ‘My Computer’.
Thanks.
Brad
|
|
|
|
|
I want to create an application that using VB6.0 for the GUI, and using C++ for the source. How can i do that?
Show me step-by-step to create an application like that.
(Assume that i have a file "exm.cpp" that contain all contents that my application need (contain include statements, Functions statements, and main statement), do i need to change my source to use with VB ? And how to change?)
Thanks
Ask More - Learn More
JohnJone
|
|
|
|
|
Hi
In short, you can't. The languages aren't interchangeable, and the nearest you could get is to wrap your c++ routines into a dll that can be used from within VB.
|
|
|
|
|
Is that easy?
If not, what are some things to study?
|
|
|
|
|
What is DLL file ? How to create it and add it into VB?
(DLL Structure please)
Ask More - Learn More
JohnJone
|
|
|
|
|
I have a really big application running on vb6, it will take months to port it to .net
in the meanwhile i need to use some GDI+ capabilities (and some threading).
I wrote some DLLs that will do the job for the big applications, but i don't know how to export them to VB6,
When i'm trying to add the reference to the DLL, it gives me an error message that it cannot use that kind of DLL.
I thought of using OCXs instead, but i don't seem to find a way to create an OCX in VB.Net (i know i can do in c++/# but i have tons of code already written in VB.net and i'm on a tight schedule)
Can anyone help me out?
Fade (Amit BS)
|
|
|
|
|
As far as I know, May the Windows Control Library Project is the project that will create the control for you. In visual studio .net 2003 go to File Menu and Choose New Project and Select VB.Net project then Choose Windows Control Library . Hope this will help you.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
i'm sorry but if it was that simple i wouldn't have posted this question.
that problem is exporting the created control to vb6
thanks for the effort though
Fade (Amit BS)
|
|
|
|
|
I am using a javascript alert as a msgbox
temp = "<script language = javascript> alert ('Login Required'); </script>"
page.registerstartupscript("login",temp)
script works fine until I add
server.transfer("login.aspx")
the transfer works and the script doesn't execute
Any Ideas on how to force the script to run first then the transfer
|
|
|
|
|
First, this question belongs in the ASP.NET Forum. Second, you can't force the client to run ANY script. Third, you might want to look into Forms Authentication. Any page that's protected by the authentication automatically redirects to a login page. You don't have to do anything in your code to make it work...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
could anyone point me to a link or source about how to edit a winforms datagrid cells to a new value,adding a new row and update those values to the sqldatabase....urgent running out of time.
i have spent allday searching google all it had was about asp.net datagrid ... HELP
thanks in advance
bart
|
|
|
|
|
In VB.NET and using XP
I am trying to write some code that will let me:
*get an administrator's password
*set an administrator's password
*logout of limited account session
*then login to the administrator account with
the new password
Any information on any one of these four steps would prove useful to me.
Thanks,
nju0843
|
|
|
|
|
You're kidding, right?
Basically, you can't do that. First, there is no function that will return any account passwords, no matter what account your using, even an admin account. Second, in order to change the password of another account, you have to have admin rights.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, Dave how about technology such as third party tool[^] that use to crack or reset password for windows? Why they can reset database but could not change the password if the we know the place where to store the password?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
You wil note that that utility you pointed out does NOT run under Windows. Since Windows is not running, the security around the SAM database is also not running. If you we're to attempt to write to the SAM database as a user you would get an Access Denied failure. Reading/Wrighting the SAM database is restricted to the System and Administrators only.
Without running Windows, read/writing the SAM database is just a matter of reading and writing files, if you know the proper format of the file, of course. I've got a UNIX boot CD that does the same thing. No, not on a UNIX system, but will let you edit the registry and clear/change passwords of a Windows XP/NT/2000/2003 machine. All you need is a file system driver that understands NTFS 5 and the proper know-how for reading and writing the registry WITHOUT using registry functions (again, because there is no Windows to do it for you!)
For a project like this, you cannot use C#, Visual Basic, J#, or any other .NET managed language. You can only use raw C++, or any other language that doesn't need a runtime or managed environment.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah, I apologize for not pointing out that i understood quite well that it is a long shot.
Providing that functionality to a developer would cause a major breach in security for the operating system. Anyone working as a programmer for a company that has limited rights to their network could simply write an application to get the admin password.
I am just trying to write a simple application for myself and I was not thinking beyond the scope of my project and of the reasons as to why Microsoft would not supply that kind of functionality. I appreciate the response, I will have to come up with a better solution to project now.
Thanks,
Xadeu
|
|
|
|