|
|
You have forgotten the @ before the second literal string.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
kindly fix the problem of my mentioned connection string that where should be place @
|
|
|
|
|
You don't understand your own code?
You have a @ delimited string which you have split into two strings, but you have forgitten to put the @ delimiter before the second string.
Example:
string s = @"A ""string"" with some ""quotes"".";
Split into two strings:
string s = @"A ""string"" with " + @"some ""quotes"".";
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
This should work:
To many qoutes according to me....
string ConnectionString = String.Concat(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=", textBox1.Text ,";Extended Properties=Excel 8.0;HDR=YES;");
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
|
You can build your string like this:
string ConnectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;""", textBox1.Text)
By the way, give your controls more meaningful names.
|
|
|
|
|
Use it this way. @ comes before any string segment
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ textBox1.Text + @";Extended Properties=""Excel 8.0;HDR=YES;""";
|
|
|
|
|
Just try this:
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='"+ textBox1.Text +"';Extended Properties=""Excel 8.0;HDR=YES;""";
Be a good professional who shares programming secrets with others.
|
|
|
|
|
i want to make the fix sized text in text box(e.g 10 characters).
it means i made a textbox and also want that user can't enter the characters upto 10 characters..
user is bound at 10 character.
--------------------------------------------------------------------------------
maifs
maifs
|
|
|
|
|
Set MaxLength property of textbox.
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
|
TextBox1.MaxLength =10;
hghghgh
|
|
|
|
|
How do I write a console application that imoplements a recursive function
that calculates the approximate infinite sum(of time) of zeno's paradox depending on the number of attempts of Archelles to overtake the tortoise.
Thanks
|
|
|
|
|
What is it that you have problems with?
Creating a console application project?
Implementing a recursive function?
Understanding the homework assignment?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Its all about implementing a recursive function.
|
|
|
|
|
You're going to need a very large stack to calculate an infinite sum. I suggest you use a Turing machine; it can do anything!
|
|
|
|
|
is java and c# encryption supports each other
i want to send an encrypted xml by c# to java . i use rsacyptographyserviceprovider to encrpyt. how can i decrypt this in java. can you give me any clue or an article which i can refer.
|
|
|
|
|
Hi,
When i try to send mail from c# windows application all mails are blocked in Queue (C:\Inetpub\mailroot\Queue). How can i unblock the mails send from the windows application.
Why it is blocked?
Thankyou,
yesu
|
|
|
|
|
ypki wrote: Why it is blocked?
Your SMTP server won't be running. Check in the IIS manager to see SMTP service is running or not.
|
|
|
|
|
I am trying to create a relation between two datatables.Here is the code i am using
SqlConnection conDatabase = new SqlConnection(databaseConnectionString);
SqlCommand cmdDatabase = new SqlCommand("SELECT * FROM StudentModule",conDatabase);
SqlDataAdapter daDatabase = new SqlDataAdapter(cmdDatabase);
//Get Columns for DataRelation
DataColumn[] databaseColumns = new DataColumn[dsImport.Tables[0].Columns.Count];
for (int i = 0; i < databaseColumns.Length;i++)
{
databaseColumns[i] = dsImport.Tables[0].Columns[i];
}
OleDbConnection conSpread = new OleDbConnection(spreadSheetConnectionString);
OleDbCommand cmdSpread = new OleDbCommand("SELECT * FROM[Sheet1$]",conSpread);
OleDbDataAdapter daSpread = new OleDbDataAdapter(cmdSpread);
//Get Columns for DataRelation
DataColumn[] spreadColumns = new DataColumn[dsImport.Tables[1].Columns.Count];
for (int i = 0; i < spreadColumns.Length;i++)
{
spreadColumns[i] = dsImport.Tables[1].Columns[i];
}
//Create DataRelation
DataRelation r = new DataRelation(string.Empty,databaseColumns, spreadColumns,false);
dsImport.Relations.Add(r);
The problem is that when i debug and step into the code the debugger does not go into the for loops,and therefore does not load the columns.What could be causing this plz help?
|
|
|
|
|
Looks you missed the statement to fill the DataSet.
daDatabase.Fill(dsImport)
Regards,
Syed Mehroz Alam
|
|
|
|
|
Thank you very much.i did not see that
|
|
|
|
|
i filled the dataset but it is still doing the same thing.
Anything else i'm missing???
|
|
|
|