|
thx for reply, what i want to save the insert statement of SqlcommandBuilder into string.
in fact what i am doing is, i want to migirate all sql server tables data into ms access.
i have same tables structure and name in ms access. i want to get all records of MS SQL tables into MS Access Tables and make 34 Access Database from that.
i just need to get the insert statement of Sql Table and assign it into MS Access.
like
OleCmd.CommandText=sqlCmdBuilder.GetInsertCommand().CommandText;
OleCmd.ExecuteNonQuery();
Note: In MS access only the autoincrement fields are changed to Not To Increment.
values should come from Sql Tables.
if you guys have any better solution, i would really appreciate.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Abdul Rahman Hamidy wrote: i want to migirate all sql server tables data into ms access.
Why???
If you need a local datastore try using SQL Server Express rather than Access
only two letters away from being an asset
|
|
|
|
|
I created Windows Service in C#.net.
In Windows service I want to connect to remot sql server 2000 But I get Error "Login failed for user(sa)".
In Windows Service first I retier data from local database but i cannot insert that data into database of remote sql server.
|
|
|
|
|
Rajesh Koriya wrote: But I get Error "Login failed for user(sa)".
Obviously the credentials you are attempting to use are incorrect. Verify the username and password.
Also, DO NOT use the sa login.
only two letters away from being an asset
|
|
|
|
|
Hello,
I want to test the audio input to make sure that the mic and speakers are working.
I am thinking about using a progress bar to measure the audio input and the output with another progress bar.
However, I am have looked at many tutorials, but I have never seen any samples of been able to do this.
Does any one know of any tutorial for measuring the input and output audio?
Many thanks,
|
|
|
|
|
I remember a couple of "volume meter" articles here on CodeProject. They would need what you want to test their code, wouldn't they? Use the search facilities!
|
|
|
|
|
Hi
I had an in-process dll built in vs2005 c#, I had made a setup by using Setup and Deployment options,
During uninstall, it is showing a message box that a sub key in the registry is unavailable, so ignore this error and continue.
If I click OK, the setup is not gets uninstalled.
How to remove this setup already installed?
what is the problem in this?
This may be the small issue, but many times this error wasting my time.
Can anyone suggest how to avoid these kind of error, and also how to remove the setup which is not getting uninstalled?
|
|
|
|
|
Hey guys,
I have an MDI Form. On my Parent Form I have a StatusStrip with a label to show Errors. (The StatusStrip Modifers I've already changed them to public.)
Now, On my child form, I have to access some data from an SQL Database while initializing it. So I want to be able to send the exceptions (if there are) to my Parent's statusstip but I can't seem to be able to access them on the initialization.
Here's my code:
Parent Form
public Main()
{
InitializeComponent();
LogForm();
}
private void LogForm()
{
Login Log = new Login();
Log.MdiParent = this;
Log.Show();
}
On my ChildForm, i Have
public Login()
{
InitializeComponent();
LoadData();
}
public void LoadData()
{
Main theParent = (Main)this.MdiParent;
theParent.StatusBar.Text = "Test";
}
What I want to try, is before accesing my DataBase, to be able to change the statusBar of my ParentForm.
But I get an error on
Main theParent = (Main)this.MdiParent;
theParent.StatusBar.Text = "Test";
As when I call Main theParent; the Parent has a value of null as myParent hasn't been loaded yet....
Any ideas???
Cheers
|
|
|
|
|
Firstly, it is bad practice to do this at all - it locks the design of the parent form to the child. This reduces reusability and should be discouraged.
Secondly, the solution to the bad practice solves the problem: use an event, fired in the child, to update the parent. Then either pass the text as the Args for the event, or set up a simple queue in the child to hold the unprocessed events and pull then out in the parent. Move the LoadData method call to the child form Load event, and off you go.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi
In my C# windows application (VS2005), I am using MsComm for serial port communication. In button Click Event i ll Send the data's to the serial port... i want to show the data progress in ProgressBar control.
Please guide me....
Thanks in advance
|
|
|
|
|
You can think of some splash screen as shown in these examples -
1. MSDN Blogs[^]
2. .NET Splash Screen Component[^]
You can find plenty of examples in Google as well. But be careful about handling with threads.
|
|
|
|
|
I m developing an application using C#.Net 2005 and MsSql 2005. How to take backup of specific database in MsSql(Using C#) and then how to Restore the backup ...
|
|
|
|
|
SqlConnection connection = new SqlConnection("Connectionstring");
SqlCommand command = new SqlCommand("BACKUP DATABASE databasename TO DISK = 'path of destination'", connection);
int effect = command.ExecuteNonQuery();
if (effect < 0)
{
MessageBox.Show("Back Up Created");
}
|
|
|
|
|
BackUp is Created but Dont Know the format..what format is to adopted by which we can restore it easily..
|
|
|
|
|
simply backupfile.bak
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
I am developing a windows application
in that i have some number of rich text box user controls
the text in that rich text box can be bold, italic, various fonts and various colours
now i need to implement a Print() which prints the text from all the rich text boxes.
the printed content should be WYSIWYG...
i am able to print the content form a single rich text box to multiple pages but
i need to modify that in such a way that it prints each page for each rich text box.
please provide me any sample codes or any examples
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Anil,
Check this out for C#[^] and this one for VB[^].
Hope this would help you.
|
|
|
|
|
Hi,
That code is to print the content from only one rich text box control
but i need to print the content from multiple text boxes.
each page should have the text from each rich text box control
Thanks
Anil Veeraghattapu
|
|
|
|
|
Anil709 wrote: That code is to print the content from only one rich text box control
This surprised me I donot know if you have even tried to achieve this implementation[^] for multiple text boxes.
I did it for two text boxes. I just had some custom code (which i did really in a hurry, it can be organised more better) for two controls FirstrichTextBox & SecondrichTextBox. Follow the instructions as mentioned in that link and modify the BeginPrint and PrintPage events -
private int checkPrintFirstControl;
private int checkPrintSecondControl;
bool firstControlDone = false;
private void printDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
checkPrintFirstControl = 0;
checkPrintSecondControl = 0;
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (!firstControlDone)
{
checkPrintFirstControl = FirstrichTextBox.Print(checkPrintFirstControl, FirstrichTextBox.TextLength, e);
if (checkPrintFirstControl >= FirstrichTextBox.TextLength)
firstControlDone = true;
e.HasMorePages = true;
}
else
{
checkPrintSecondControl = SecondrichTextBox.Print(checkPrintSecondControl, SecondrichTextBox.TextLength, e);
if (checkPrintSecondControl < SecondrichTextBox.TextLength)
e.HasMorePages = true;
else
{
e.HasMorePages = false;
firstControlDone = false;
}
}
}
If you need the full sample then send me your email id.
|
|
|
|
|
Hi,
your code is really impressive.
it appears it will solve my problem.
can you please send me the sample to my mail id
my mailID: anilveeraghattapu@gmail.com
Thanks
Anil Veeraghattapu.
|
|
|
|
|
Hi
it seems your code is trying to print text from only one text box right??
it could print either first text box data or from second text box data
but what i need is i have to print text from all the text boxes in page wise
i think you understood my problem.
consider ms word. if you click on print preview it will prints text from each page of the word document to a real page.
i want to achieve similar kind of thing.
Thanks
Anil Veeraghattapu
|
|
|
|
|
Anil709 wrote: it could print either first text box data or from second text box data
No..what I tried is to print both textboxes content in a single print click. Though I have no printer installed, I checked in the Print preview (I guess that should be enough). There, the First text box's content is shown in 2/3 pages and in next pages 2nd content is shown.
Anyway I have sent you the code in your email id.
Note - I coded very fast just to verify if multiple Rich text boxes can be printed or not. It could be done in better way.
|
|
|
|
|
1 computer(user) is login How to find user login detail such as user name,Host Name,Using C#
2 How to nothing happended (any key not work) when i fill login detail (Using C# Form)
|
|
|
|
|
Question 1): Try this.[^]
Question 2): It may be your English, it may be my brain, but this makes no sense whatsoever. Try to elaborate on your problem. What have you tried, what is happening or not happening? What are you expecting to happen?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I have a small asp.net project that I have been working on using Dynamic Data and Entities for managing usernames, passwords, resources and such. I would like to save the password fields to the database encrypted and when the data is loaded decrypt it. I would assume I would call the changes through the scafolding class but I am not sure and how to do that if it is the case. Table name Users, column name Password encryption class named encrypt and decrypt.
I am a newbie so please be gental.
Thanks in advance
Britt
|
|
|
|