|
actually the service is running my aim is to extract the information from database. it seems the reader does not retrn anyting. am using the file as my dubug technic. is ther a better way to debug
|
|
|
|
|
Yes there is a better debug method for windows services. Check out the MSDN article at the following link, that should help...
How-to Debug Windows Service[^]
|
|
|
|
|
thanks i appreciate. will contact u if i hav more issue on that
|
|
|
|
|
i did what i read setting break point on the onstart method and it end sub when i pressed f10. it jumb to the line that instatiate timer if i press f10 again it show error that i acnot debug winservice
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
'System.Threading.Thread.Sleep(15000)
Try
t = New Timer(2000) 'stop here
't = New Timer(TimeInterval)
AddHandler t.Elapsed, AddressOf TimerFired
With t
.AutoReset = True
.Enabled = True
.Start()
End With
Catch ex As Exception
log.WriteEntry(ex.Message, EventLogEntryType.Information)
End Try
End Sub
|
|
|
|
|
So you were able to attach to the process, move in to debug mode, but then it died on you? I'm not sure but that might be because debugging a service starting from OnStart can be problematic because if you spend too much time in OnStart, your service won't actually start. You might try putting a sleep right before you do your database connection, provided that is not in OnStart, and let OnStart run without any breaks. Then maybe you can get into debug mode before the connection happens and then step through the code from there.
|
|
|
|
|
i put the break point on timer fire . on pressing f11 it jump to dim log line. then to sub new . the yellow point disappear.then the error "cannot start from the command line or debbuger....."
Dim log As New EventLog("Application", ".", "Diamond eMail Solution")
Private Sub TimerFired(ByVal sender As Object, ByVal e As ElapsedEventArgs)
'Working()
'getApplicationData()
ProcessMail()
End Sub
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
|
|
|
|
|
Hiii
I m working on outlook 2003 add ins using vb.net. and i want to inset the particular text at the end of the curent message in reply window not at the bottom of the message.
Ex:
Hiii
Mr XXX
From
M [Insert Text Here]
---------------------------------------------------------------------------------------
From:khatrimitesh@hotmail.com
Sent: Sunday, June 22, 2008 6:00 PM
To: mitesh.khatri
Subject: Outlook Project Specs
Mitesh
Regards
M
I want to insert the text at the <inset text="" here=""> location not at the end of this message in reply window.
Please suggest how i do this.
Thanx
~Khatri Mitesh
|
|
|
|
|
Dear Gents,
I have added a image in picturebox say image1.jpg when form s loaded. In a button click I want to check whether image in a picture box is image1.jpg or some other else.
Pls help me to achieve this
Regards
Azeem
|
|
|
|
|
an imagebox has a property 'initailimage'
my suggestion would be to put the image1.jpg into this property (and never change it)
then compare the imagebox.image to the imagebox.initialimage
I vagly rember doing something like this in the past and it did work so...
|
|
|
|
|
If picturebox1.Image = image1 then
do something...
End If
Just replace [image1] with the location of the image you want to check.
How many bytes of text have I typed in my lifetime??? Man, I wish I kept track...
|
|
|
|
|
First, I am assuming you marked the other two answers (which would have worked) as a bad answer. Don't do this if you do not understand what they are saying, it just agravates other forum dwellers.
Second, you should be able to store unique picture information in the Tag property (as a string), and then compare the unique values of different images when replacing the image. I would suggest the unique value be the filename of the picture.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thanks a lot.
Absolultely corrct.
Regards
Azeem
|
|
|
|
|
Hi all,
i have a problem where i have a recordset of about 200 records containing customer names, for each record, i have to open a crystal report passing the recordset data as parameter and then exporting that report to html format (4.0)
main problem is that when i run the program it works fine for few records and then it gives an error
"Unhandled win32 exception occured in vb6.exe[7828] "
and thus terminating the program.
this error appears randomly sometimes after 15 records and other times after 50+ records.
i am attachign the code with this thread please havea look at the code and do suggest me a solution. it looks as if its related to memory management.
thanks in advance.
regards,
atin...
code
Private Sub Command1_Click()
stdt = CDate(strStDt)
seldt = CDate(strSelDt)
'rs is recordset db is connection object
rs.Open str1, db, adOpenDynamic, adLockOptimistic
Set cry = New CRAXDRT.Application
ReDim strCS(1 To rs.RecordCount)
For i = 1 To rs.RecordCount
strCS(i) = rs.Fields(0)
rs.MoveNext
Next i
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
Set rep = cry.OpenReport("DtrList-xbndrstatement.rpt")
For i = 1 To UBound(strCS)
rep.EnableParameterPrompting = True
rep.DiscardSavedData
rep.ParameterFields.GetItemByName("seldate").AddCurrentValue seldt
rep.ParameterFields.GetItemByName("stdate").AddCurrentValue stdt
rep.ParameterFields.GetItemByName("stCus").AddCurrentValue strCS(i)
With rep
.ExportOptions.FormatType = crEFTHTML40 'exporting to html format'
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.HTMLFileName = "C:\" + strCS(i) + ".html"
.Export False
End With
Next i
Set rep = Nothing
cry.CanClose
Set cry = Nothing
End Sub
|
|
|
|
|
Hi,
I am trying to debug a .net 2003 windows service on a remote computer using VS2003.
I am connected to the remote pc by a VPN.
I have installed the msvcmon.exe on the remote and ran it in tcpip mode.
I am able to connect to the remote computer and service process using debug, Processes in VS2003. Using Tcpip.
But I put a breakpoint on a line and the debugging is not being hit.
Is this a futile exercise???
Should I upgrade my service to 2005 and use that debugger??
Or is it something I am missing??
Malcolm
|
|
|
|
|
hi ,
I m developing application which contain information about chemical compound. all formula of chemical compound contains superscript & subscript. I store value in database using sub & sup Tag .but crystal report does not support these tag
how can we change formula to subscript & superscript form in crystal Report as following
NH4Al(SO4)2.12H2O
Any help will be appreciated
Thanks in advance
K.mani
Software Engineer,
C-Tech Environmental Labs PVT Ltd,
Chennai(India)
By
K.mani
|
|
|
|
|
Does crystal support RichText Format? If so you could store your forumlas in Rtf or convert to Rtf.
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi,
i want to add a comment to DataGrid cell just like in Excell i am using VB.Net 2003 thanks.
Mohammad Al Hoss
|
|
|
|
|
Here[^]
(Didnt saw the link so not sure if it helps)
|
|
|
|
|
This link is for .net 2005 and i am using 2003 but thanks for your help
Mohammad Al Hoss
|
|
|
|
|
Hi,
i have a project in which i mostly use Public Sub or Sub declaration because i am used to it. Most of those subs, could have been actually even Private Sub. Do i gain something if i change those subs(public subs or subs) and make it private sub in performance issue(for example memory)?
thanks in advance...
|
|
|
|
|
No difference in memory or performance.
This is a design issue, not a performance one.
|
|
|
|
|
No differences in performance. But if you are making everything public, you are breaking the OO rules. So only expose the needed methods/properties to the outside than exposing everything.
|
|
|
|
|
Public declaration not effect the performance but it is not a good programming to declare all variable and member declare public.
Thanx
~ Khatri Mitesh
|
|
|
|
|
Hi Friends,
In my VB 6.0 application, I am using database connection in a module. But now i need to place the connection in .ini file so whenver there is a change in connection string i can change .ini file. So pls. help me how to create .ini file for db connection and also how to call that file from my application. Please help me.
Thanks and Regards,
|
|
|
|
|
aaraaayen wrote: In my VB 6.0 application, I am using database connection in a module. But now i need to place the connection in .ini file so whenver there is a change in connection string i can change .ini file. So pls. help me how to create .ini file for db connection and also how to call that file from my application. Please help me.
IIRC, you can use API calls to read INI files from VB6.
HTH
|
|
|
|