Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Opening multiple files Pin
Giorgi Dalakishvili2-Mar-08 10:22
mentorGiorgi Dalakishvili2-Mar-08 10:22 
GeneralRe: Opening multiple files Pin
Jacob Dixon2-Mar-08 10:24
Jacob Dixon2-Mar-08 10:24 
GeneralRe: Opening multiple files Pin
Jacob Dixon2-Mar-08 10:28
Jacob Dixon2-Mar-08 10:28 
GeneralRe: Opening multiple files Pin
Giorgi Dalakishvili2-Mar-08 10:50
mentorGiorgi Dalakishvili2-Mar-08 10:50 
GeneralRe: Opening multiple files Pin
pmarfleet2-Mar-08 10:39
pmarfleet2-Mar-08 10:39 
Questionhow to save an office file to database? Pin
mahmoud wafy2-Mar-08 10:06
mahmoud wafy2-Mar-08 10:06 
GeneralRe: how to save an office file to database? Pin
Giorgi Dalakishvili2-Mar-08 10:18
mentorGiorgi Dalakishvili2-Mar-08 10:18 
Questioncopy part of table from one DB to table in another DB don't work Pin
evgenik2-Mar-08 8:44
evgenik2-Mar-08 8:44 
Hello.

I want copy part of table from one Database to table in another Database.

In this code in line adp.Fill(dsArchive, "Archives"); i have error of incorrect types of fields. When i removed condition"WHERE..." i haven't errors ,but nothing working. Data don't transfer.(Vial_Date - field of table,type DATATIME, contents - data, for example 22/02/2007; SelectedData - data for condition in SQL) Where i mistaked?

My email: evgenik@sysmop.com.

Thanks.Evgeni Kosakovski.



public void BackupArchivesDB(string SelectedData)
{
int tblArchiveCount, tblBackupCount;
adp = new System.Data.OleDb.OleDbDataAdapter();
DataSet dsArchive = new DataSet();
DataSet dsBackup = new DataSet();

conArchive.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Archives.mdb;Jet OLEDBatabase Password=abc";
conBackup.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Backup.mdb;Jet OLEDBatabase Password=abc";

try
{
conArchive.Open();
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
try
{
conBackup.Open();
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}

comArchive.Connection = conArchive;
comArchive.CommandText = "SELECT * FROM Archives WHERE Vial_Date < '" + SelectedData + "'";
comBackup.Connection = conBackup;
comBackup.CommandText = "SELECT * FROM Backup";

try
{
adp.SelectCommand = comArchive;
adp.Fill(dsArchive, "Archives");

adp.SelectCommand = comBackup;
adp.Fill(dsBackup, "Backup");

dsBackup.Merge(dsArchive);

}
catch (Exception Ex)
{

MessageBox.Show(Ex.Message);
}
finally
{
conArchive.Close();
conBackup.Close();
}
}
GeneralRe: copy part of table from one DB to table in another DB don't work Pin
Paul Conrad27-Mar-08 12:27
professionalPaul Conrad27-Mar-08 12:27 
Generalneed to open a spreadsheet document in a listView Pin
Walaza2-Mar-08 7:03
Walaza2-Mar-08 7:03 
GeneralFull Path to DOS Path Pin
Ian Uy2-Mar-08 5:10
Ian Uy2-Mar-08 5:10 
GeneralRe: Full Path to DOS Path Pin
DaveyM692-Mar-08 5:23
professionalDaveyM692-Mar-08 5:23 
GeneralRe: Full Path to DOS Path Pin
pmarfleet2-Mar-08 5:24
pmarfleet2-Mar-08 5:24 
QuestionHow can I Allow focus for multiple controls? Pin
eyalbi0072-Mar-08 4:30
eyalbi0072-Mar-08 4:30 
GeneralRe: How can I Allow focus for multiple controls? Pin
pmarfleet2-Mar-08 4:46
pmarfleet2-Mar-08 4:46 
GeneralRe: How can I Allow focus for multiple controls? Pin
eyalbi0072-Mar-08 5:17
eyalbi0072-Mar-08 5:17 
GeneralRe: How can I Allow focus for multiple controls? Pin
pmarfleet2-Mar-08 6:02
pmarfleet2-Mar-08 6:02 
QuestionHow can i store path of zipfile in DataBase MS-SQL Using C# 2.0 Pin
Member 43708982-Mar-08 4:09
Member 43708982-Mar-08 4:09 
GeneralRe: How can i store path of zipfile in DataBase MS-SQL Using C# 2.0 Pin
pmarfleet2-Mar-08 4:44
pmarfleet2-Mar-08 4:44 
GeneralRe: How can i store path of zipfile in DataBase MS-SQL Using C# 2.0 Pin
Christian Graus2-Mar-08 10:58
protectorChristian Graus2-Mar-08 10:58 
GeneralRe: How can i store path of zipfile in DataBase MS-SQL Using C# 2.0 Pin
Member 43708983-Mar-08 7:33
Member 43708983-Mar-08 7:33 
QuestionCalling WebMethods using Request XML? Pin
geekfromindia2-Mar-08 4:03
geekfromindia2-Mar-08 4:03 
AnswerRe: Calling WebMethods using Request XML? Pin
pmarfleet2-Mar-08 4:43
pmarfleet2-Mar-08 4:43 
GeneralRe: Calling WebMethods using Request XML? Pin
geekfromindia2-Mar-08 5:03
geekfromindia2-Mar-08 5:03 
GeneralRe: Calling WebMethods using Request XML? Pin
pmarfleet2-Mar-08 5:18
pmarfleet2-Mar-08 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.