|
sorry,one point is forgot i took two tables one table for customresearch_t, another table for uploadfile_t is this useful for my requirement.
|
|
|
|
|
hello plz reply this problem
|
|
|
|
|
Hi Guys,
Have on Windows XP been using the following code to authenticate if username and password are valid up against Active Directory. But found out that my apps are not working on Visa OS as it always return false, even if user + pw is correct - on XP no problems works 110% fine there, but on vista.. urgh!
private bool doAuthenticate(string szController)
{
string path = "LDAP://" + szController;
DirectoryEntry de = null;
if (szUserName == null)
{
de = new DirectoryEntry(path);
}
else
{
de = new DirectoryEntry(path, "\\" + szUserName, szPassword);
}
try
{
Object native = de.NativeObject;
return true;
}
catch (Exception ez)
{
return false;
}
}
Any who have an idea on what is happening?
Cheers,
|
|
|
|
|
Hi All,
i want to convert PDF file into tiff file using a code.
Do you have any idea how can i achieve this using any 3rd party Dll ?
Thanks.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
|
Thanks Danish,
but nothing is free......
I am looking for code even..
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Here[^] and here[^]
You should have googled this yourself.
जय हिंद
|
|
|
|
|
hi friends
i have a doubt in c#
i have two forms one is windows form and the other user control form i have a button on each control .i added a user control on windows form at run time by this.controls.add(usrctrl1).Is it possible to run the user control button automatically on clicking windows form button .if it is possible how can it be plz reply it sir
waiting for Your reply Sir
|
|
|
|
|
|
Create a public method in the user control that you call from the form's button_Click handler. In that method (in the user control) call the PerformClick method of the user control's button.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi,
I am having an application in region laguage i want to convert ascii code to unicode can anybody tell how can i do it.
|
|
|
|
|
System.Text.Encoding.Convert
जय हिंद
|
|
|
|
|
Because Unicode includes ASCII, ASCII is Unicode, no conversion is necessary.
|
|
|
|
|
HI
here is my code i take 1 txt,1datagride,2 button,1 file dialog box .
on 1 button i open filedialog box select 1 excel file and fetch string in to txt box,and try to open this excel file in datagride view
WHEN I RUN MY PROGRAM A RUN TIME EXCEPTION THROWEN BY OLEDB IE,
Cannot update. Database or object is read-only.
PLZ HELP
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Data.OleDb;
namespace filedialog
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
private void button2_Click(object sender, EventArgs e)
{
string filename = @"textBox1.Text";
String connectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + filename + ";" +
"Extended Properties=Excel 8.0;";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
//String connectionString="Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source="+filename +";"+"Extended Properties=Excel 8.0;";
OleDbCommand selectCommand = new OleDbCommand("SELECT * FROM [sheet1$]", connection);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter();
dataAdapter.SelectCommand = selectCommand;
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
// double sum = 0.0;
// We'll make some assumptions for brevity of the code.
System.Data.DataTable dataTable = dataSet.Tables[0];
dataGridView1.DataSource = dataSet.Tables[0];
MessageBox.Show(dataGridView1.RowCount.ToString());
connection.Close();
//openFileDialog1.ShowDialog();
//openFileDialog1.ShowDialog();
// return sum;
// directorySearcher1.FindAll();
}
private void button3_Click(object sender, EventArgs e)
{
OpenFileDialog FD = new OpenFileDialog();
FD .Filter="Excel|*.xls";
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
}
}
}
|
|
|
|
|
Mangesh Tomar wrote: string filename = @"textBox1.Text";
Is this what you intend to do?
Which line throws this exception?
जय हिंद
|
|
|
|
|
Two questions, related to the error "Cannot update. Database or object is read-only.";
- Are you "viewing" the sheet in Excel whilst running this code? If yes, then close it.
- Have you checked the properties of the file itself? Ie, it shouldn't be blocked etc.
I are troll
|
|
|
|
|
i want a regular exprssion for a string which doesnt starts with "SA" or "K" and this is case insensitive
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
I want to kick someone's ***. Lets pray together that our wishes are fulfilled.
जय हिंद
|
|
|
|
|
Use the algorithm from your signature.
|
|
|
|
|
Sounds easy enough, what do you have so far?
|
|
|
|
|
If the rest of the expression doesn't matter, then iterate through the string, if the first character is a K, then accept it, otherwise if the first character is an S, check the second character and if it is an A, then accept the string. That's pretty much a simple way of looking at it and should be easily written in C#. Try to convert that to C# code, and if you have issues, post what you have and we'll try to help further.
|
|
|
|
|
i am new to c#.net...i am having 90 text files having image intensity values...i am reading n th row of every text file and write it into newly created text file....i have done this in matlab .i am getting correct output...but in this program i have done something wrong...because of that the no.of columns are not same in each row...i couldn't get the output image....here is the program
private void button1_Click(object sender, EventArgs e)
{
try
{
string path1="c:\\Vicky\\DATAS\\OutputFiles";
string path2 = "\\";
string path4 = ".txt";
DirectoryInfo dir1 = new DirectoryInfo(path1);
dir1.Create();
DirectoryInfo Dir = new DirectoryInfo(@"C:\Vicky\DATAS\textfiles");
FileInfo[] FileList = Dir.GetFiles("c*.txt",SearchOption.AllDirectories);
for(int t=1;t<280;t++)
{
string path3=Convert.ToString(t);
string path=path1+path2+path3+path4;
FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
foreach (FileInfo FI in FileList)
{
FileStream fs1 = FI.OpenRead();
StreamReader sr = new StreamReader(fs1);
int i = 1;
while (sr.ReadLine() != null)
{
string d="";
if (t == i)
{
d = sr.ReadLine();
sw.WriteLine(d);
break;
}
i++;
}
}
}
}
|
|
|
|
|
you're writing 279 same files...plus
if (t == i)
{
d = sr.ReadLine();
sw.WriteLine(d);
break;
}
this will break in every first while loop
File.Copy() can do what you need
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
thanks for ur reply....i don't know how file.copy() method is going to help in this program.here i am not copying the file to another path...i am just reading the the same row of every text file and copy it into new file..and u told me that this program will write 279 same files...but i am getting 279 different text files with different memory sizes....
|
|
|
|
|
nettai wrote: ..but i am getting 279 different text files with different memory sizes....
yes, if you dont mind then your code is very tacky. All you need to do is that read all lines from each text file using File.ReadAllLines() as Danish said. That will return string[] and you can rip the line by index then add to the generic string list List<string></string> . When you done, write entire list using File.WriteAllLines() (you will need to use ToArray() to get the array from list).
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|