|
da_imp = new DataAdapter(sqlcommand);<br />
SqlCommandBuilder cb_imp = new SqlCommandBuilder(da_imp);<br />
da_imp.Update(dt_imp);
|
|
|
|
|
I have a desktop application, where you have a link to start the web application. The web application uses a ms access db to retrieve data from.
Now what I want to add is, a "next" button on the desktop app, to get the next row on the ms access to be retrieved and printed to the web applications.
right now the web app get the data on page_Load
public void Page_Load(Object sender, EventArgs E)
{
DataAccess da = new DataAccess();
//Choose the table
string sql = " SELECT * FROM readfrm";
DataSet result = da.GetDataSet(sql);
int size = result.Tables[0].Rows.Count;
// string txtName.Text;
txtName.Text = result.Tables[0].Rows[0]["Name"].ToString();
How can I retrieve the next row on db readfrm by a next button on my desktop app ? The reason is desktop app is a small notification window which is trigerred by some event to tell you there are new rows added to the db, and by clicking on it or clicking on next you will see whats new on the db.
Thanks
|
|
|
|
|
I'm not entirely sure how your desktop and web app are set up, but this is how I would do it.
Assuming that your Desktop app knows about the new record(s) that you want to display in the Web app (for example, it knows the ID of the new record), I would have the link that points to the Web app have a querystring value for the ID of the record to open in the Web app.
The URL in the link will looks something like http://mydomain.com/ShowMeTheNewRecord.aspx?id=New_ID_From_Desktop_App_Goes_Here
Obviously New_ID_From_Desktop_App_Goes_Here will be replaced with the identifier for that record in the database. Then you can check in your page load to see if there is a querystring value, and if there is, load the corresponding record in your webform.
Hope I didn't confuse you...
|
|
|
|
|
How do I programmatically get a list of users in an ActiveDirectory group? A google search has shown up several ways of doing it, none of which I can get to work and none of which seem to agree with each other. Is there a definitive way to, say, get a list of users of a group called, for example, Sales?
|
|
|
|
|
Did you search codeproject? There is one article which explains how to do anything with active directory
|
|
|
|
|
I've tried several articles on here and about 50 which Google has shown up. It might be that I have spent so long on this the answer will just pass me by now. I just want a list of user names from a group to populate a listbox. Creating and editing a text file to hold the data is looking very attractive right now.
|
|
|
|
|
A bit of venting always works
http://www.codeproject.com/KB/system/QueryADwithDotNet.aspx[^]">
|
|
|
|
|
How do I get string data into a byte array, programmatically, without doing a hex conversion. i.e.,
byte[i] = (???)string.Substring(0,2);
I need the programmatic equivelent of:
byte[] bytes = {0x14, 0x55, 0x90, 0x00, 0x01}; or
byte[i] = {0x + string}
I can't make any of this work. Need Guru!
TIA,
Steve
|
|
|
|
|
Hi there,
Maybe this will put you in the right track:
string StringToConvert = "abc";<br />
byte[] bytes = StringToByteArray(StringToConvert);<br />
<br />
private byte[] StringToByteArray(string str)<br />
{<br />
char[] chars = str.ToCharArray();<br />
byte[] bytes = Array.ConvertAll<char, byte="">(chars, new Converter<char, byte="">(CharToByte));<br />
return bytes;<br />
}<br />
private byte CharToByte(char ch) { return (byte)ch; }</char,></char,>
Hope it helps.
Danny
|
|
|
|
|
Hi Danny,
This looks like what I'm after except I'm getting two errors when implemented:
Error 1 Using the generic type 'System.Converter<tinput,toutput>' requires '2' type arguments
Error 2 The type arguments for method 'System.Array.ConvertAll<tinput,toutput>(TInput[], System.Converter<tinput,toutput>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
What did I do wrong?</tinput,toutput></tinput,toutput></tinput,toutput>
|
|
|
|
|
Sorry, I guess the pasting went wrong, the function should look like this:
private byte[] StringToByteArray(string str)
{
char[] chars = str.ToCharArray();
byte[] bytes = Array.ConvertAll<char, byte>(chars, new Converter<char, byte>(CharToByte));
return bytes;
}
|
|
|
|
|
private byte[] StringToByteArray(string str)
{
char[] chars = str.ToCharArray();
byte[] bytes = Array.ConvertAll<char, byte>(chars, new Converter<char, byte>(CharToByte));
return bytes;
}
|
|
|
|
|
byte[] byteData = System.Text.Encoding.ASCII.GetBytes("Some string i want an array of bytes for");
If ASCII isn't your chosen encoding there are other useful ones predefined such as UTF8
|
|
|
|
|
Do we have any pre-requistes before creating an excel object for a windows application developed using c#?
Is there any sort of memory limitation when creating an excel object. Our application runs fine when few processes are running along with the application, however when the number of other processes are increased then an error is displayed " THERE IS NOT ENOUGH MEMORY TO RUN MICROSOFT EXCEL. PLEASE CLOSE OTHER APPLICATION AND TRY AGAIN ". The solution to this error is a system restart, when this error occurs you cannot open any existing excel file too!
Please note that our application has needed excel objects clean up code.
What could be the cause for this error? How to resolve this?
Kindly help!
gauthee
|
|
|
|
|
gauthee wrote: Please note that our application has needed excel objects clean up code.
What does this mean? You need clean up code and you're getting out of memory exceptions? Seems an obvious problem.
only two letters away from being an asset
|
|
|
|
|
Hi all,
Someone told in this forum that he got some dlls from this forum.
But i did not get any dll link,can any anyone send such dll link or told me how to find dlls from this site.
thanks.
|
|
|
|
|
|
42?[^] I bet he wants more DLLs.
|
|
|
|
|
anupamwb wrote: Someone told in this forum that he got some dlls from this forum.
But i did not get any dll link,can any anyone send such dll link or told me how to find dlls from this site.
Vague, out of context and confusing.
Someone: Who?
some dlls: That do what? Any DLLs, you can find some in C:\Windows\system32 if your not too fussed about what they do.
I did not get any dll link: Are you saying others did?
Send such a dll link: What sort of DLL?
how to find dlls from this site: There are hundreds linked from the articles, but to do what?
You really need to learn how to communicate better.
|
|
|
|
|
Someone: Who? ---u are not regular in forum. then only u can find.
some dlls: That do what? Any DLLs, you can find some in C:\Windows\system32 if your not too fussed about what they do.------- --all members in this forum knew what dll is and in windows where they found?
I did not get any dlls link:Are you saying others did?-- I am saying this in my case not for others.
Send such a dlls link: those dlls that are used in ASP.NET C# Web Application(Convert Word Files to PDF),(Rating cases).
how to find dlls from this site: There are hundreds linked from the articles, but to do what?---I need Only the Specific Keywords to find the dlls articles.
You really need to learn how to communicate better.---U should be more careful before asking such silly question.that can be answered .
I am novice in case of Handling DLLS
I need some of DLLs that will help me to get idea about them.If u have no mode to help,don't criticize in future.
|
|
|
|
|
Wow - This makes even less sense than the original post. What are you smoking? Can I have some?
|
|
|
|
|
Colin Angus Mackay wrote: really need to learn how to communicate better
I agree. I couldn't really understand the OP. I am sure a certain programming language by a certain former member on this site, could not parse the OP either
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
During the night it's usually colder than outdoors.
|
|
|
|
|
You need to achieve a level of Zen like calm that takes years and years of study. Once you have become a 23rd Dan C# coder with 50 years of experience the link magically pops into site right before your eyes.
|
|
|
|
|
Reading articles is good for your DLLs craving....
|
|
|
|