|
dear sir,
thank you for the message...
len_ems
|
|
|
|
|
You can create your application is a windows service
or Your application is a standard project and you write infomation of your application to registry
-good luck-
|
|
|
|
|
There is no context in which to place this request.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
And now that the original poster has deleted their message there is even less context in which to place the request.
Ohhh.. Wellllll...
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I have a program that saves a value to a file.
When I call the method below the value is saved.
The problem is that the method sometimes gets called more than once consecutively, and I get an unhandled exception error in my operating system.
How can I handle this error so if the system is already busy writeing the file, the method is canceled?
Many thanks,
Glen Conaway
Private Sub SavePosition()
' Creating stream Writer type object
Dim SW As StreamWriter
' Create FS As FileStream
Dim Fs As FileStream
' Creating steam.txt using filestream object and reference
' to filestream object
Fs = New FileStream("C:\stream2.txt", FileMode.Create)
' Initializing steam reader object using filesteam object
SW = New StreamWriter(Fs)
' Saving data to file
SW.WriteLine(ListBox1.SelectedIndex)
' Closeing stream writer
SW.Close()
' Closeing file stream
Fs.Close()
End Sub
|
|
|
|
|
Glen Conaway wrote:
How can I handle this error so if the system is already busy writeing the file, the method is canceled?
See this article on MSDN: Error Handling the VB.NET Way: Living with Exceptions[^]
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
I'm checking it out, looks like what I need.
Many thanks for your help,
Glen Conaway
|
|
|
|
|
The simplest way i can think of is to have a boolean flag at each end like this inside of a do loop so it keeps checking.
This way will mean it will only process if it is not processing and it will keep checking until blnProcessing becomes false again if you get what i mean
Private Sub SavePosition()
Dim blnProcessing as boolean
Do while 1 = 1
if blnprocessing = false then
blnProcessing = true
' Creating stream Writer type object
Dim SW As StreamWriter
' Create FS As FileStream
Dim Fs As FileStream
' Creating steam.txt using filestream object and reference
' to filestream object
Fs = New FileStream("C:\stream2.txt", FileMode.Create)
' Initializing steam reader object using filesteam object
SW = New StreamWriter(Fs)
' Saving data to file
SW.WriteLine(ListBox1.SelectedIndex)
' Closeing stream writer
SW.Close()
' Closeing file stream
Fs.Close()
blnProcessing = false
exit do
End if
wend
End Sub
"I am what i am, and i do what i do, but sometimes i do, what you want me to do."
|
|
|
|
|
Your question is very vague. Are you retrieving data from an SQL database, Access database, XML file, a WebService, ... You'll have to be a bit more specific as to what you're trying to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
For VB
Check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprofilterx.asp
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
This is my code
------------------------------------
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 39 Then
Image1.Left = Image1.Left + 50
End If
If KeyCode = 37 Then
Image1.Left = Image1.Left - 50
End If
If KeyCode = 40 Then
Image1.Top = Image1.Top + 50
End If
If KeyCode = 38 Then
Image1.Top = Image1.Top - 50
End If
End Sub
Private Sub Timer1_Timer()
If Image1.Top = Shape1.Top And Image1.Left = Shape1.Left Then
MsgBox "Touch"
End If
End Sub
--------------------
My Problem is:
I want to fire the events If the Image1 touch any edge of the shape1.
|
|
|
|
|
Raise what event? Are you asking how you can define your own custom event and fire it?
You have to declare an event to fire first, something like this at the module level, class level, or form:
Public Event MyEvent(MyArg1 As Integer)
And you fire it like this:
RaiseEvent MyEvent(someValue)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I just developed access database application, I store the table in one file and form (interface) in another file. I do like this because I want to protect the source data from unauthorize access from the other people. I have a problem when I want to present data to a report. The report always ask for the table and the field when I need to drage its control on the report design space. I want to know the way that could pass the value from the first database file to the report in the second database file. Please help me
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
If your going to use two databases like this and want to use the designers, you'll have to create a table link to the other database and treat it like an external data source. Only then will you be able to use the report designers to visually put the report together.
In Access, you haven't protected the data by putting it is a seperate file. All you've done is make it more difficult to write the code to use it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, import table is my final step that I used to solve the problem. But I don't want to do that. Wheter the table are link to the other mdb file but it seem that it store in the same file because any one can view its data. What i want to do is store the table and form, report in a difference file and link it together by using the code. Do you have any sugesstion?
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Yes. Access isn't designed to do that! It's a desktop database for simple database solutions. It wasn't designed to do what you want. If you want the data seperate from the presentation and business logic code, you're going to have to move it to either an MSDE or SQL Server solution.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I facing some problem in the write data to the database file. Basically, i want to write the data after i read it from text file(aa.txt), and then want to compare the databasr file with the orginal text file.
for example,
"comcode(0) = &H10
res = aa_i2c_read(aardvark, slave, 5, comcode(1), AA_I2C_NO_FLAGS)
s = Str(comcode(1)) + Str(comcode(2))"
I want the Str(comcode(1)) write to the database in low 1, and the Str(comcode(2)) in low 2 in the same database.
After finish write to the database, i want to compare the low by low with the original text file (aa.txt).
Anyone can give some exmple coding to solve this problem?
thanks.
|
|
|
|
|
hi there!i just want to ask if you can provide me or give me sample source code on how to select the datas from database to excel wherein the equivalent relaycode of relay monitoring data(relaycodes and their equivalent relay are in the database) will be put on the worksheet where the pivoted datas are. datas are already summed up using pivot table and in the sheet1(for example) of the worksheet.the problem s,how will i able to put the equivalent relaycodes in the sheet1 where the summed up datas are? please i really need your help..tnx
|
|
|
|
|
I try to debug, but to some extend, sometimes this error do occurs.
But sometimes it doesn't. I get this error, when i click on one of the graphs (which query the database), the result sets will repaint the graph and update itself. Any ideas why this happen ? Here's the error description..
AppName: msaccess.exe
AppVer: 11.0.5614.0
AppStamp:3f3c8e3c
ModName:owc10.dll
ModVer:10.0.5605.0
ModStamp:3f2eb3be
fDebug
Offset: 000efbd1
|
|
|
|
|
That's not an error. What you posted was a description of Access when it crashed. We need every word of the actual error message.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That is the problem.
There isn't any actual error, which I find this very hard to debug.
Which is why I said, sometimes it crash and sometimes it doesn't.
Here's the behaviour from what I observed.
I basically retrieve data from the database, while retrieving, I Repaint the graph (Line chart). To my understanding, if the data takes longer to retrieve, it then have enough time to draw the graph as it moves along. But on some occasions, datasets are small, and it's done retrieving, but the front end doesn't have enough time to rePaint the chart. So any help I get is truly appreciated. I've been sleeping thinking about this day and night...
The program just crashed...
|
|
|
|
|
Without seeing any code, it's going to be impossible to tell you want may be wrong.
How are you drawing the Graph? 3rd party control? MSGRAPH?
I haven't found any information in the MS KB articles about a problem like this in Access...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm using the OWC10.ChartSpace object to draw my charts.
It's being referenced to the OWC10.dll file.
|
|
|
|
|
Any code to go with that?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello everyone,
I have been working on a Tic Tac Toe program off and on over the last few weeks. I am at a point where I need to add a save and load ability for high scores. I have no idea where to look to learn about saving your game or program - how to do it with a dialog or without a dialog box. If there is any documentation that could teach me how to program a save and load feature in my tic tac toe program - and other programs coming in the future - that would be awesome.
Thank you all!
~Achithyn
Version of software: Visual Basic .NET 2003
|
|
|
|