|
StrReverse is a VBA function that is not available outside of Access. You can only use the supported SQL functions from outside of Access.
The list of what Access supports in SQL statements can be found here[^].
Basically, if you can use the function name in VB, you can't use it in SQL.
|
|
|
|
|
In addition to Dave Kreskowiak's answer. OleDb also has "predefined" keywords. Sometimes you'll need to change column names or change the SQL to pass around this.
Just for info.
(PS: I don't think that's the case here btw)
V.
|
|
|
|
|
hey.. can anyone tell me that how can i convert files(doc,pdf etc) to UDF(universal disk formate) using .net libraries.. if not then is there any third party software tht does so.. doc to udf conversion ? i have checked out but found plenty of third party softwares that convert udf to other formats not ..other formats to udf ????plz reply otherwise i will be fired.. lolx
|
|
|
|
|
That makes no sense. It's like asking how to convert a doc file to a zip file. Or like asking how to convert a stack of paper to a suitcase. The paper goes inside, it does not "become" the suitcase.
What do you really want? Put files together in an UDF file? Or convert an ISO to UDF perhaps?
|
|
|
|
|
hmm thanks.. iso to udf.. regards
|
|
|
|
|
Ok, I don't know of any .NET libraries that will help you with that.
|
|
|
|
|
and wht about the third party softwares ?
|
|
|
|
|
Nero can definitely do it, I thought MagicISO too but I'm not very sure about that one.
|
|
|
|
|
hmm ok thanks.. very much..
|
|
|
|
|
Hi everyone,
I'm having trouble with the Application.DoEvents() in my c# application.
The application is for setting up a measurement with an oscilloscope and reading the data.
I have a loop, doing roughly this:
SetupHardware();
while(this.Run == true)
{
Application.DoEvents();
StartMeasurement();
ReadData();
AddDataToGraphControl();
}
I added the "Application.DoEvents()" because the user can change instrument settings with a form, and the controls' events need to be handled for that. Also the "Stop" button sets the global boolean "Run" to false.
Since the Application.DoEvents() doesn't seem to handle ALL pending events (I'm probably doing something wrong here, but that's another story), I started googling about Appication.DoEvents(), and found that I should avoid using it, and use multithreading instead.
I'd like to believe that, but I think in this case the use of Applicaition.DoEvents is the best practice here...
Can someone shine some light on this? Am I correct in thinking this is an exception to the "don't-use-DoEvents()" rule? How could I approach this using multitheading (which I haven't used before)?
modified 7-Feb-12 5:36am.
|
|
|
|
|
DoEvents is rarely the correct approach, and I don't think this is an exception. What you should do is have a thread which handles the instrument I/O (well, I, in this case ) and fires events which the main thread hooks up to:
class InstrumentThread {
Thread t;
public event EventHandler<InstrumentEventArgs> DataReceived;
public Thread Thread { get { return t; } }
public InstrumentThread(){
t = new Thread(Run);
}
private void Run(){
while(running){
StartMeasurement();
ReadData();
DataReceived(new InstrumentDataEventArgs(data));
}
}
}
class InstrumentEventArgs : EventArgs {
SomeType Data { get; private set; }
public InstrumentEventArgs(SomeType data) { Data = data; }
}
class MyForm : Form {
public MyForm(){
it = new InstrumentThread();
it.DataReceived += InstrumentDataReceived;
it.Thread.Start();
}
void InstrumentDataReceived(object sender, InstrumentEventArgs ea){
if(InvokeRequired) {
BeginInvoke(new EventHandler<InstrumentEventArgs>(InstrumentDataReceived), new object[] { sender, ea });
return;
}
AddDataToGraphControl(ea.Data);
}
}
|
|
|
|
|
Thank you for your reply. I'm still struggling with the instrument setup (setting vertical range, timebase, etc).
These settings should (to maintain a decent framerate) only be written to the instrument when the user changes a setting on the form. And on a fixed position: before StartMeasurement() (well, most importan is not between StartMeasurement() and ReadData(); that would cause problems).
I could ofcourse do:
NumericUpDown_VerticalRange_ValueChanges(Object sender, EventArgs e)
{
this.InstrumentSetupChanged = true;
}
and then in the InstrumentThread's Run method use
private void Run(){
while(running){
StartMeasurement();
ReadData();
DataReceived(new InstrumentDataEventArgs(data));
}
}
But I doubt working with this flag is a proper approach?
|
|
|
|
|
I'd have no problem with that, though normally I'd push messages onto a queue or something and then clear it where you put your comment. But if the message is just 'do something' then a flag is fine.
|
|
|
|
|
Application.DoEvents() is evil and should be avoided at all costs. You cannot seriously mention it and "best practice" in one and the same sentence.
A long winding operation needs to be handled in a separate thread; that is the way to keep your GUI operational, and to preserve a normal user experience. Often a BackgroundWorker comes in handy, as its ProgressChanged event fires on the GUI thread.
There is one alternative, and that is based on a timer, i.e. one operation (measurement) gets executed per timer tick. I am wondering about your setup, does it run "as fast as it can"? I see no code that synchronizes to a clock?
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
As stated in my reply to BobJanova, i don't use DoEvents() because of a "normal user experience", but because that is the moment I want to handle the instrument-setup events.
My application is an pc-scope application, so indeed it runs "as fast as it can".
|
|
|
|
|
The problem with DoEvents is that you're not just handling your instrument events. You handling ALL events, including your form controls and repaint commands. So if the use clicks a button a second time when they're not supposed to, or changes text, or moves the form, or whatever, those events get handled right along with your instrument events.
DoEvents processes all pending event messages until the message queue is empty. This opens you up to reenterant code possibilities where your code is not written to handle it.
|
|
|
|
|
Just to add to what Dave said, I'm not sure I would trust a scope (PC based or not) that ran "as fast as possible" - that implies that other events in the system are controlling or affecting the sampling rate. Which means that what I see on the "screen" may not be consistent and repeatable. I would much, much rather have a scope that had a slower, known speed so that artefacts become more obviously scope related than hardware.
I have spent too much time trying to find the source of a problem that turned out to be due to variable sampling frequency rather than a hardware or software problem in the target.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Oh, don't worry about that. I use real oscilloscope hardware. So on StartMeasurement(), the instrument is armed, waits for a trigger, and then fills the acquisition record with samples that are captured on a sampleclock. When the measurement is finished, I read the whole record from the instrument's memory to the PC, and re-arm the instrument. So running "as fast as possible" has no influence on the sampling rate.
|
|
|
|
|
Hello,
Am new in Programming and i chose to start with C#. I have an application that am building but am unable to connect my 'Add a member' form to a MySql database. I have created text boxes for first name, last name, phone, city and down there an ADD and CANCEL buttons.
Could someone please give me the code to link the add button to the database such that the information on the text box is sent to the database. Please help out like you doing it to a two year old.
Thanks.
|
|
|
|
|
Member 8624435 wrote: Am new in Programming and i chose to start with C#
Good choice.
Member 8624435 wrote: Could someone please give me the code to link the add button to the database
Nobody will GIVE you code. What did you try? How did you search? Maybe you need other keywords. Try this site[^] for starters. In addition, you don't link the ADD button to the database directly. read up on 'n-tier applications' and you'ld probably want a book to start with.
Member 8624435 wrote: Please help out like you doing it to a two year old.
My son is nearly two, he cannot read or write yet, let alone program. We assume you have a certain level of intelligence.
In summary:
- Start with a book and read it from first to last page.
- Don't post anything like 'give me code' and the likes. You must do the effort. people here only guide or advice you.
- The tone of your question is wrong and might be downvoted by others. (just for info)
Hope this helps.
V.
|
|
|
|
|
Rather than asking for the code you should try doing some research, try typing your question into a google search. Any basic question will have been answered 1000s of times and you can use them to begin your research.
Do not rely on this as your only source of knowledge, buy a book, it will give you some structured learning.
When you have a specific problem with something then come back with the code that is giving you a problem and you'll find this site much more useful.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i want to access my other forms when i click the button from one form.... can anyone tell how to access the other forms in c#.????
|
|
|
|
|
You can use delegates to communicate between forms.
Here[^] is a decent example.
|
|
|
|
|
Well there are multiple methods. Another approach can be
- make a static class and define its data/function members
- set values of data member of this class from Form2.
- access this static class in Form1.
- Before setting (or after getting) values, you can clear all the values of static class.
It all depends on situation. Once delegates did not work for me so had to use this method
|
|
|
|
|
thanks for your useful info....
|
|
|
|