|
int [][]j1=new int[][];
You are asking the system to create an array, but you have not told it how big the array should be.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
The problem is that you are defining j1 as "an array of [arrays of ints]".
So when you try to create a new instance of it, you have to tell it how many "arrays of ints" this instance will be.
If you defined
int[] arr = new int[]; then it is clearly wrong: it acan't allocate space for an unknown number of objectes, you have to say
int[] arr = new int[7];
So enter a size for the array:
int[][] j1 = new int[100][]; And all will be well.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
|
I love those "lightbulb" moments!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I have <big>str="ADVFGFVGVVCCG"</big> and wanna to get <big>plainText</big> from it!(I mean to get plaintext from end of code to start)
Please help !
byte[] bytes = Encoding.ASCII.GetBytes("™ںô…0Dƒہ;?ت£أ¾y");
byte[] rgbSalt = Encoding.ASCII.GetBytes("ی©¨ô\reعءfcééh£");
byte[] buffer = Encoding.UTF8.GetBytes(plainText);
byte[] rgbKey = new PasswordDeriveBytes("⑯آJٌ<'=»„&5ؤ؟Kك„y‰‚~–¹'`I½", rgbSalt, "SHA1", 2).GetBytes(256 / 8);
ICryptoTransform transform = new RijndaelManaged { Mode = CipherMode.CBC }.CreateEncryptor(rgbKey, bytes);
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream, transform, CryptoStreamMode.Write);
stream2.Write(buffer, 0, buffer.Length);
stream2.FlushFinalBlock();
byte[] inArray = stream.ToArray();
stream.Close();
stream2.Close();
str = Convert.ToBase64String(inArray);
|
|
|
|
|
i want to post some articles,But Getting some alert message.
|
|
|
|
|
you think adding a couple of smilieys and posting again in the wrong forum is going to make a difference - you know what the definition of stupid is don't you!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i want to post some articles,But Getting some alert message.
|
|
|
|
|
|
If you have a problem while posting articles, report this in the site bugs and suggestions section.
|
|
|
|
|
Hi,
I want to create a auto pilot script in c# window. the functionality will be - i will add list of url in notepad file and i can use either web browser control to show the content of website. when the page will be loaded first i want to click on register page, after than auto fill register form and third step will be click on register button, is there any one who can share any code.
I have done something, my program is in three parts right now
1. First i have coding to click on register button
2. under webbrowser_loaded event i have assigned value to text boxes by finding get element by name
3. and in third step i click on register button
if i put all coding in webbrowser_loaded event it always click on register button and program goes into loop.
if i manually click on register button the next step program do automatically.
then i manually click on register button
can any one help me out where i put all three steps so that system wont go into loop
thanks and regards
|
|
|
|
|
Hi,
Use a flag variables such as Boolean type. If the Register button is already clicked then, our boolean will have a true value saying this is already registered. & it won't execute the code again.
Regards,
Satish
|
|
|
|
|
i want to display the list of access database names in a combobox, i get an exception
public static List<string> GetDataBasesNames(string datasource)
{
cnx = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + datasource);
cnx.Open();
List<string> DtataBaseNames = new List<string>();
OleDbCommand cmd = new OleDbCommand ("SELECT Name FROM MSysObjects WHERE Name Not Like 'MSys*' AND (Type In (1,4,6)) ORDER BY Name", cnx);
OleDbDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
DtataBaseNames.Add(rd.GetString(0));
}
return DtataBaseNames;
}
|
|
|
|
|
Seems the exception message already tells you what to do (set read permissions to whatever you're logging in as on that system table).
|
|
|
|
|
|
Through your database configuration environment ... something like GRANT READ ON (table name) TO (user name), but I'm not a DBA expert (I usually set up database users through a host's web interface because my requirements are simple).
|
|
|
|
|
Hi,
Try by changing your query to this..
select name from sys.databases
If this has not worked properly, show the exception message.
with regards
Karthik Harve
modified 23-Apr-12 7:23am.
|
|
|
|
|
i want to display the list of access database names in a combobox, i get an exception
public static List<string> GetDataBasesNames()
{
cnx = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0");// how I can connect to Access without specifying the database, I want to retrieve all the names of databases
cnx.Open();
List<string> DtataBaseNames = new List<string>();
OleDbCommand cmd = new OleDbCommand ("SELECT Name FROM sys.database", cnx);
OleDbDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
DtataBaseNames.Add(rd.GetString(0));
}
return DtataBaseNames;
}
|
|
|
|
|
Repeating your OP verbatim is not helpful.
|
|
|
|
|
MemberDotNetting wrote: how I can connect to Access without specifying the database, I want to retrieve
all the names of databases
You don't. What you are trying to do is not possible to do with an Access database. Access databases are individual files and are not hosted in a server like SQL Server.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
You can't do that. There is no such thing as an Access Database Server that maintains a list of every database registered with it. That's not how Access works.
Access is a desktop file-based database. Every database is its own seperate entity. There is no such table of databases anywhere.
The only way to do what you want is to search the hard drive for files ending in the supported extensions. That list varies depending on which version of Access is installed on the users machine.
|
|
|
|
|
Hi,
I am building an application that uses Exchange Web Services (EWS). Everything that I have build works except retreiving a list of calender rooms from Exchange. In Microsoft Exchange Console I have created 3 different rooms. In my C# code I want to list this three rooms. This is my source code:
EmailAddressCollection myRoomLists = service.GetRoomLists();
foreach (EmailAddress address in myRoomLists)
{
Console.WriteLine("Email Address: {0} Mailbox Type: {1}", address.Address, address.MailboxType);
}
But no room lists will be returned with this source code! Why?
Mr BigSpender
|
|
|
|
|
Håkan Axheim wrote: service.GetRoomLists();
Obviously the line above is not returning anything. Some settings maybe?
|
|
|
|
|
The method GetRoomLists takes no parameters so where can I set the settings?
|
|
|
|
|
A config file perhaps / exchange settings?
|
|
|
|