|
Hi All,
I have been trying to connect to a Btrieve database. For that I use Pervasive ODBC drivers ( Pervasive owns Btrieve now. ) I am able to connect to that database on my local machine. Btrieve database stores its data and all related stuff in flat files. Which I backed up from my production server, and was able to connect to this successfully. But when I tried to create a DSN on production server, follwing the same procedure, i got some error messages such status code: 4122, etc...
I am fed up of this database altogether now.
So, can anybody suggest me -
1. Is it possible to access Btrieve files directly from .Net ( ofcourse using ODBC drivers, but avoiding DSN errors)
2. Any way to create "link tables" (MS-Access) and then use that instead.
3. Accessing DSN on remote PC's in .Net directly without DSN on local machine ?
I am very fed-up of this thing. Also I need to find some solution to use that database. A quick solution will be most welcome. Even a complete solution is not there, please provide some ideas. (I dont know more about Btrieve, even how to find which version of Btrieve I am using.)
Thanks.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi,
I have the following problem:
I have a generic, which derives from a normal base class like this:
public class MyClass <T> : BaseClass
{
T m_Value;
public SetValue(T val)
{
// ...
}
public T GetValue(){ ... } ;
}
These classes are stored in a generic dictionary, which is instantiated like this:
dictionary<string, BaseClass> dic = new dictionary<string, BaseClass>();
At one point, I want to acess the SetValue Function, but I have to cast to the exact type, and typeof() / GetType doesn't works here.
What I try to do looks similar like this, but I haven't a solution yet;
MyClass< dic["Key"].GetType() > tC, tC2;
tC.SetValue((dic["Key"].GetType())dic["Key"].GetValue());
This isn't correct (i left out the instantiation) , I know, but I need to cast at runtime to the exact
generic type, stored at the position in the dictionary, for accessing the
generic, type specific Get/Set function.
Any comments ?
Thanks,
Florian
|
|
|
|
|
I've search google exhaustively looking for some help with this and can't seem to find anything that has been productive. I have a Dynamic Link Library written in C++ which makes use of a callback:
LRESULT CALLBACK eventListener(HWND hWnd, UINT msg, WPARAM wP, LPARAM lP)
{
...
}
I'm trying to write a C# wrapper for this library and cannot seem to find the correct way to form the delegate to make use of the callback.
If anyone could point me in the right direction or knows of an example that might be helpful, it would be very much appreciated.
|
|
|
|
|
Your function resembled a lot some of the win32 user32.dll
Look at www.pinvoke.net to get some ideas based on the functions of windows
|
|
|
|
|
I've looked there, but unfortunately, have only seen the delegate definition without any examples on implementing it. The only reference I've found that comes close is a newsgroup post with someone having the same trouble. Of course, his question went unanswered as well. Luck of the Irish at it's best. lol
|
|
|
|
|
I made a new thread cause i managed to solve my problem and thereby create a new one: I have a treeview with process names, there aren't any child nodes, the nodes' names are the process ID and i add them like so:
for (int i = 0; i < a.Length; i++)
{
treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
}
Now, i have a timer that adds \ removes processes so i need to check the list if the process exists, and i managed to get the search thing working but i can't seem to remove them, here's the code:
a = Process.GetProcesses();
for (int i = 0; i < a.Length; i++)
{
bool found = false;
if (treeView1.Nodes.Find(a[i].Id.ToString(), true).Length == 0)
treeView1.Nodes.Add(a[i].Id.ToString(), a[i].ProcessName);
for (int m = 0; m < treeView1.Nodes.Count;m++ )
{
if (a[i].Id.ToString() == treeView1.Nodes[m].Name)
found = true;
}
if (found == false)
treeView1.Nodes.Remove(treeView1.Nodes[a[i].Id.ToString()]);
}
How can i fix it, or is it a more efficient way of doing it?
|
|
|
|
|
a = Process.GetProcesses();
treeView1.Nodes.Clear();
foreach (Process p in a)
treeView1.Nodes.Add(p.Id.ToString(), p.ProcessName); /ravi
|
|
|
|
|
Does anyone know how to add the raw HTML help project to a C# project so that they are compiled together.
I would like to be able to compile the help each time I build rather than use a pre-compiled one.
Many thanks
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Confused
Do you want a Web application project with Windows application project both work in hand ? or some thing different ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
What I want is to be able to take my HTML Help project and ensure that that is built when I compile my C# project that requires that help.
I was just wondering how people have done this as I did not have a solution when I posted the message. In the mean time I have created a .bat file that is called on pre-build for the C# project and creates the help file that way.
It may not be perfect but it is functional and fit for purpose.
Thanks for your interest.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
i have a string, i want to add "\u" for each 4 charachters of the string,
when i write a for loop, it refuses adding \u, i have to add @\u
for example: i have the strng 541236589632 i want to transfer it to \u5412\u3658\u9632
how can i do this on c# application
Thanks alot
Hamody
|
|
|
|
|
I assuming you are having problems with the escape character I would define the string that you are adding as follows:
private const string mystring = @"\u";
This tells the compiler to take the string litterally and not use the slash as an escape character.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
hello there, it doesnt solve the problem, i still have duble of "\\" string ....
it didnt solve the problem
how d u see???
Thanks alot
Hamody
|
|
|
|
|
If you post your code and I will take a look at it then. Please also show input and output for your code and the desired output.
I am not 100% sure what you are having a problem with otherwise.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
string ResultMessage="";
string varMessage;
varMessage = MMOUTBOUND_DGV.Rows[0].Cells[2].Value.ToString();
for (int k = 0; k <= varMessage.Length - 1; k++)
{
ResultMessage = ResultMessage + "\u" + varMessage.Substring(k, 4);
k = k + 3;
}
MessageBox.Show("ResultMessage ");
Thanks alot
Hamody
|
|
|
|
|
First may i sugest in the for loop
for (int k = 0; k <= varMessage.Length - 1; k=k+4)
and eliminate the k=k=3;
As suggested before your code must be
ResultMessage = ResultMessage + @"\u" + varMessage.Substring(k, 4);
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
OK, you have a choice when escape characters are wanted as literal in strings:
you need to change
+ "\u" +
to
+ @"\u" +
or
+ "\\u" +
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
helloz,
am not using an escape characters, i want to change from the ASCII code, so for example:
when i write in code:
messagebox.show("\u0064");
it will show me the character 'd' on the message that appear, so i can't use '\\u' instead of using '\u'
now what can i so to solve this problem
Thanks alot
Hamody
|
|
|
|
|
Hey guys, i got the solution which is:
private string HexAsciiConvert(string hex)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i <= hex.Length - 4; i += 4)
{
sb.Append(Convert.ToString(Convert.ToChar(Int32.Parse(hex.Substring(i, 4), System.Globalization.NumberStyles.HexNumber))));
}
return sb.ToString();
}
enjoy and thanks to all of u
Thanks alot
Hamody
|
|
|
|
|
Aloha,
We are creating a windows app. that will read some information from a website.
Our problem is that the target website doesn't like our requests, it complains that our app. is an undefined HTTP_USER_AGENT.
We can access the website with IE and Firefox, so now we are looking for a way to make our windows app. look like one of these browsers when it requests a webpage.
Any idea how we can do that?
Thanks,
|
|
|
|
|
Try looking up the WebBrowser Control which comes with .Net2
|
|
|
|
|
We have tried that, it still complains about the user agent
|
|
|
|
|
Can you try this
public void functionToNavigate()
{
object oMissing = null;
HTMLDocumentClass objects=new HTMLDocumentClass();
axWebBrowser1.Navigate(URL,ref oMissing,ref oMissing,ref oMissing,ref oMissing);
while(axWebBrowser1.Busy)
{
Application.DoEvents();
}
objects=(HTMLDocumentClass)axWebBrowser1.Document;
}
private void axWebBrowser1_Enter(object sender, System.EventArgs e)
{
}
Why you are getting this error any idea ?
<l>Thanks and Regards
Sandeep
|
|
|
|