Click here to Skip to main content
15,895,423 members
Home / Discussions / C#
   

C#

 
QuestionHow to initialize a nullable array object at runtime? Pin
Spunky Coder22-Oct-07 23:18
Spunky Coder22-Oct-07 23:18 
AnswerRe: How to initialize a nullable array object at runtime? Pin
DavidNohejl22-Oct-07 23:23
DavidNohejl22-Oct-07 23:23 
GeneralRe: How to initialize a nullable array object at runtime? Pin
Spunky Coder22-Oct-07 23:39
Spunky Coder22-Oct-07 23:39 
AnswerRe: Regular Expression in String.Replace() method. Pin
william.zheng22-Oct-07 23:07
william.zheng22-Oct-07 23:07 
GeneralRe: Regular Expression in String.Replace() method. Pin
J4amieC22-Oct-07 23:31
J4amieC22-Oct-07 23:31 
JokeRe: Regular Expression in String.Replace() method. Pin
Guffa22-Oct-07 23:40
Guffa22-Oct-07 23:40 
QuestionHow to validate current object in databinding before move to another Pin
El'Cachubrey22-Oct-07 22:02
El'Cachubrey22-Oct-07 22:02 
QuestionInsert command Pin
sindhutiwari22-Oct-07 21:38
sindhutiwari22-Oct-07 21:38 
HI : The Given Code is to store the specifications of the controls which are added to a form database is access ,here global is a class , lsave,i are variables
there is no syntax error at runtime a error is coming i.e Syntax error in insert into statement i have checked many times the database format and the format of the values both are same still the error is comming i will be thankful for ur suggestions as i am struck at this point.







OleDbConnection connection = new OleDbConnection();
connection.ConnectionString = WindowsApplication1.Properties.Settings.Default.printsoftwareConnectionString;
connection.Open();
//loop for saving the positions of the labels
OleDbDataAdapter oda = new OleDbDataAdapter("select * from controlspecifications",connection);
OleDbCommandBuilder cmb1 = new OleDbCommandBuilder(oda);
DataSet ds1 = new DataSet("controlspecifications");
oda.Fill(ds1, "controlspecifications");
DataRow dr = ds1.Tables["controlspecifications"].NewRow();

for (lsave = 0; lsave <= i; lsave++)
{

dr[0] = global.projectname + "adsfsd";
dr[1] = lab[lsave].Name;
dr[2] = Convert.ToInt32(lab[lsave].Left);
dr[3] = Convert.ToInt32(lab[lsave].Top);
dr[4] = Convert.ToInt32(lab[lsave].Width);
dr[5] = Convert.ToInt32(lab[lsave].Height);
dr[6] = lab[lsave].Text;
dr[7] = lab[lsave].Font.FontFamily;
dr[8] = Convert.ToInt32(lab[lsave].Font.Size);
dr[9] = lab[lsave].ForeColor.ToString();
dr[10] = lab[lsave].BackColor.ToString();
if (lab[lsave].Font.Bold == true)
{
dr[11] = "bold";
}
else if (lab[lsave].Font.Italic == true)
{
dr[11] = "italic";
}
else if (lab[lsave].Font.Underline == true)
{
dr[11] = "underline";
}
else
{
dr[11] = "strikeout";
}
dr[12] = "dasfsad";
ds1.Tables["controlspecifications"].Rows.Add(dr);
oda.Update(ds1, "controlspecifications");
oda.Fill(ds1, "controlspecifications");

sindhu tiwari
AnswerRe: Insert command Pin
pmarfleet22-Oct-07 22:28
pmarfleet22-Oct-07 22:28 
GeneralRe: Insert command Pin
sindhutiwari22-Oct-07 22:35
sindhutiwari22-Oct-07 22:35 
QuestionRegular Expression in String.Replace() method. Pin
248912822-Oct-07 21:29
248912822-Oct-07 21:29 
AnswerRe: Regular Expression in String.Replace() method. Pin
Pawel Gielmuda22-Oct-07 22:34
Pawel Gielmuda22-Oct-07 22:34 
AnswerRe: Regular Expression in String.Replace() method. Pin
Guffa22-Oct-07 22:54
Guffa22-Oct-07 22:54 
QuestionCopy Identity column data Pin
Rabab Siblini22-Oct-07 21:15
Rabab Siblini22-Oct-07 21:15 
AnswerRe: Copy Identity column data Pin
pmarfleet22-Oct-07 22:34
pmarfleet22-Oct-07 22:34 
GeneralRe: Copy Identity column data Pin
Rabab Siblini22-Oct-07 22:37
Rabab Siblini22-Oct-07 22:37 
GeneralRe: Copy Identity column data Pin
pmarfleet22-Oct-07 22:57
pmarfleet22-Oct-07 22:57 
QuestionGetting form names then converting [modified] Pin
Ajm11322-Oct-07 21:02
Ajm11322-Oct-07 21:02 
Questionto check compressed drive Pin
tnaveen22-Oct-07 20:14
tnaveen22-Oct-07 20:14 
AnswerRe: to check compressed drive Pin
Giorgi Dalakishvili22-Oct-07 20:28
mentorGiorgi Dalakishvili22-Oct-07 20:28 
AnswerRe: to check compressed drive Pin
Ajay.k_Singh22-Oct-07 20:42
Ajay.k_Singh22-Oct-07 20:42 
Questioncan anybody give me a example of making a control by inheriting system.windows.controls? Pin
jacobi#22-Oct-07 19:52
jacobi#22-Oct-07 19:52 
AnswerRe: can anybody give me a example of making a control by inheriting system.windows.controls? Pin
Ajay.k_Singh22-Oct-07 20:46
Ajay.k_Singh22-Oct-07 20:46 
Questioncompressed drive Pin
tnaveen22-Oct-07 19:21
tnaveen22-Oct-07 19:21 
AnswerRe: compressed drive Pin
Andrei Ungureanu22-Oct-07 19:55
Andrei Ungureanu22-Oct-07 19:55 

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.