|
Thanks,
file is in the same folder as the exe is but still it is not reading the values.
|
|
|
|
|
Without seeing your code and what's in the config file, it's pretty difficult to go any further with this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Function to read config tag
Private Function ReadConfigTag(ByVal Tag As String) As String
Dim objTag As ConfigurationSettings
Dim strTagValue As String = objTag.AppSettings("Tag")
Return strTagValue
End Function
Config File
<appSettings>
<add key="Request" value="C:\"/>
</appSettings>
I just want to read the value of the key.
|
|
|
|
|
nitin_ion wrote: Dim strTagValue As String = objTag.AppSettings("Tag")
Ummmm...You're trying to return the value of the "Tag" key, which doesn't exist in your configuration file, and not the tag name in the Tag variable. You want your code to read like this: (you also don't need the declarations...)
Public Function ReadConfigTag(ByVal Tag As String) As String
Try
Return ConfigurationSettings.AppSettings(Tag) ' No quotes!!!
Catch ex As Exception
' An exception show never be thrown, but, just in case...
Throw New InvalidOperationException("Unable to read application config file!", ex)
End Try
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I have a dataset populated in a datagrid, it is my report form. I am trying to convert it to xls file so that user can write some comments on it and print. Is there anyway or hints how can I convert this dataset data into xls file. Pls Help.
Thanks In advance
Regards
|
|
|
|
|
You never said if this was a Windows Forms app or a Web app, so, the best suggestion is to go over this[^] Google result set and see what fits your situation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Any resources/Tutorial avaiable on design pastterns used in VB.net with Basic concepts.
|
|
|
|
|
You might want to look at http://www.dofactory.com/[^] and pick up the book.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi. I'm Mario from Italy.
I've got a problem with timers.
My application has 8 timer. Well my application implements an OCX for Radio Management. The changechannel OCX function has got a problem because (as the manufacturer of the radio told me) the timers suspend the background processes (as changchannel).
Well now I should change the timers, but how can I do it ?
Help me help me !
-- modified at 5:34 Friday 17th March, 2006
|
|
|
|
|
Your question isn't very clear at all. There's a bunch of information missing.
What version of VB are you using? VB6, VB.NET 2002, 2003, 2005?
Your app has 8 Timers in it? What kind of Timers? Forms based??
Timers don't suspend background processes, so I have no idea what he's talking about.
You said your ChangeChannel function has a problem, but you never said what that problem was. You also never said what you need this function to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
you're right !
I'm using VB6
My app has 8 forms based timer
The ChangeChannel function changes the channel on the radio.
But when I put this statement in the timer, it doesn't have any effect on the radio.
My app is a really perticulary app.
It's a radiocontrol allarm event management ...
|
|
|
|
|
Forms based Timers do not block background processes or threads from running. The code in the Tick event runs on the same thread as the rest of the UI.
The problem appears to be in the OCX code that changes the channel, but since we have nothing to look at, it's difficult to tell.
What MIGHT be happening is that your making a change to the control, the control is supposed to update somehow, but can't because the thread is busy doing other things in your code. You might want to add a DoEvents() call to the line immediately after your channel change code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I've a loop (while) just after the the changeChannel function, whit DoEvents.
The while loops until the radio channel has not changed. You see I've a loop, because the channel has not changed.
While radio Channel <> channel request
DoEvents
wend
|
|
|
|
|
Do any one has the idea of tunneling in visual basic 6.0. The basic idea behind this is accessing the restricted websites through proxy server from a client machine
Mangilipelli
|
|
|
|
|
That depends on what you mean by "tunneling through a proxy". Are you asking how to get around the proxies blocked site restrictions? If so, you can't do it, not in any language...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As i have seen this concept of tunnel in Visual Basic 6.0, one of my colleague has done this but didn't want to mention the API's he has mentioned in his program
Mangilipelli
|
|
|
|
|
Yeah, and he's lying through his teeth.
Since your entire networks only path out to the Internet is through that proxy, there's nothing you can do on your machine to get around that. That is, of course, unless someone left a way around the proxy on your network, or he knows something about your proxy server that he really shouldn't know.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Everybody,
I am new to .Net Tech. I just want to know benefits of .Net from Developer point of view and from end user point of view.
Thanks & Regards,
Chandan Kumar
|
|
|
|
|
How about asking Microsoft about it...Visual Studio Developer Center[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In my application,
I have a listbox to list out the image in a directory,
when the client click the file,
a picture box will display the file by setting the image from the file,
I sure that I have dispose the image and set it to nothing.
But while I system.io.directory.delete(DIRPATH),
Error shown that the file in the directory is using by other application.
How can I track back where is the image still using in my application??
|
|
|
|
|
It's being used by the same Image object that you used to display the image. This is a known "feature" since using Image.FromFile holds the image file open for the lifetime of the Image.
Load your Image into a PictureBox, or whatever, as described in this[^] KB article on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hai
like is there any alternative for this?
suppose i have some 100 buttons and the same functionality when clicking them
usually we write
private sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.click,button2.click,.........
//some code
end sub
so is there any alternative instead of writing button1.click,button2.click,.........button100.click
thanks in advance
|
|
|
|
|
You will have to register the event handler for every button in any case...
Search MSDN for AddHandler
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi All,
I have posted this message before as well but i am having trouble coding it the response to my previous post was
Performance will suffer each time you have to go back to the database to get the records you need.
Your best shot is to use a DataView on your DataTable so it returns all the records with at ID.
It's a different View of the table. DataViews can be reconfigured quickly so...
What you'd probably do is
1. retrieve a small table with all the UNIQUE (hint, hint) ID's you're going to use,
2. then retrieve all the records that contain all the ID's you want in a seperate table.
3. Now, you'll iterate through the first table, with the ID's, and use each, one at a time,
to build a DataView on the second table that will return only the records with that ID.
You can then use the data in that DataView to bind to your control.
Dim dv As New DataView(dataTable)With dv
.AllowDelete = False
.AllowEdit = False
.AllowNew = False
.RowFilter = String.Format("ID='{0}'", idToFind)
.Sort = "CompanyName DESC"End With' Bind you control to this DataView
--------
so far i have coded...
**************************
'select the table with only distinct ID based
cmd = New SqlCommand("select distinct measure_id from measuredata m, textdata t where t.ScoreCardId = m.ScoreCardId", objConn)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtId As New DataTable("MeasureId")
da.Fill(dtId)
'DataGrid1.DataSource = dtId
'DataGrid1.DataBind()
'select all columns with ID
Dim cmd1 As SqlCommand = New SqlCommand("select * from measureData", objConn)
Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("MeasureSource")
da1.Fill(dt)
Dim myView As New DataView(dt)
Dim rowview As DataRowView
For Each rowview In
myView.RowFilter = String.Format("ID='{}'", dtId.Columns.Item("measure_Id"))
Next rowview
'DataGrid2.DataSource = dt
'DataGrid2.DataBind()
****************************
now i dont know how to do the 3rd one. Please note. i am not looking for a whole block of data in one go. i need to seperate each chunk of data and bind it to my webcontrol so that based on each ID it will create a web chart.if there is 4 IDs it will create 4 web charts and displayed in page load.
so i will be looking for a each set of data for each ID like
webchartControl1.datasource = dataset(@from ID 1)
webchartControl2.datasource = dataset(@from ID 2) and so forth.
#actualy i also want to instanciate webchartControl too if there is more data avaialble instead of having lots of instances hardcoded. just dont know how to do that.
and hardest bit is
#those all charts are going back in repeater. and those charts are populated in each row based upon their parent ID.
Its a lots of task, I will be really happy if any of you know a software that does those stuff happy to buy one and save time.
many thanks in forward.
robin
|
|
|
|