|
If the user has typed an invalid entry, so that CellValidating raises an error, and they then decide to abandon the edit and want to click the Cancel button, the form won't close because the eror still exists. Error needs to be cleared first.
I just can't work out a way to achieve that, short of teaching the user that if they click Cancel, and the form doesn't close, press Esc so text reverts to original and then click Cancel again. Not ideal.
|
|
|
|
|
I know it's pretty old but I faced the same problem and wanted to ask if you managed solve it or not?
Even setting CausesValidation property of the close button doesn't work. What have you done to work around the issue?
Thanks a lot.
|
|
|
|
|
As far as I can remember I didn't solve the problem. User must press Esc to cancel the edit before doing ANYTHING else. You notice no-one offered a solution.
|
|
|
|
|
Thanks for replying. I saw no one replied but thought you may have devised a work around.
The behaviour isn't good. Close button is close button afterall. Anyways thanks for your time.
Cheers!
|
|
|
|
|
Dear All,
I am using following statements to create a view [query] in Access 2003 but i am getting an error which states "Operation is not supported for this type of object"
query="create proc vw_getCommunityMember as SELECT CommunityMember.CommunityMemberID, CommunityMember.CommunityID, zPosition.PositionID, CommunityMember.MemberName, CommunityMember.Age, CommunityMember.FamilySize, CommunityMember.MemberName_Dari, zOccupation.Occupation, zLiteracyLevel.LiteracyLevel, zLeadershipCategory.LeadershipCategory, zIncomeStatus.IncomeStatus, zGender.Gender, zPosition.Position, CommunityMember.isSyn, CommunityMember.IncomeStatusID, CommunityMember.OccupationID, CommunityMember.GenderID, CommunityMember.LiteracyLevelID, CommunityMember.LeadershipCategoryID, IIf(IsNull([CommunityMember].[ElectionPeriod]),1,[CommunityMember].[ElectionPeriod]) AS ElectionPeriod FROM zPosition RIGHT JOIN (zOccupation RIGHT JOIN (zLiteracyLevel RIGHT JOIN (zLeadershipCategory RIGHT JOIN (zIncomeStatus RIGHT JOIN (zGender RIGHT JOIN CommunityMember ON zGender.GenderID = CommunityMember.GenderID) ON zIncomeStatus.IncomeStatusID = CommunityMember.IncomeStatusID) ON zLeadershipCategory.LeadershipCategoryID = CommunityMember.LeadershipCategoryID) ON zLiteracyLevel.LiteracyLevelID = CommunityMember.LiteracyLevelID) ON zOccupation.OccupationID = CommunityMember.OccupationID) ON zPosition.PositionID = CommunityMember.PositionID ORDER BY zPosition.PositionID;";
cmd.CommandText=query;
cmd.Connection=con;
cmd.CommandType= CommandType.Text;
cmd.Transaction=t;
cmd.ExecuteNonQuery();
the error is not that much clear for me. any idea what the error states?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
are you sure that your statement is correct? I thought it must be "CREATE PROCEDURE". But more important is that the JET-Engine (which you propably use) does not support procedures. So take a look here:
http://office.microsoft.com/en-us/access/HP010322191033.aspx[^]
So you got several options:
1. Do not use a procedure (you are doing a simple select, right?)
2. Use another database which provides support for procedures (and a bigger amount of data)
3. Do not use the JET-Engine to create your procedure
Regards
Sebastian
|
|
|
|
|
thanks alot from your answer,
i sorted it out, there is a key word in my select statement, I used to put all Column names in brackets [] and now its working.
thanks, changing data provider is not the option.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Im trying to develop an app which is kind of like a smaller custom 'taskbar' i cant seem to find a way to shrink down the desktop area, essentially reserving 32 pixels from the top of the screen so maximized apps do not hide it/app does not hide app titlebar. Any suggestions would be greatly appreciated.
|
|
|
|
|
damianrda wrote: Im trying to develop an app which is kind of like a smaller custom 'taskbar' i cant seem to find a way to shrink down the desktop area, essentially reserving 32 pixels from the top of the screen so maximized apps do not hide it/app does not hide app titlebar
Something like this[^]?
I are Troll
|
|
|
|
|
Great, just what i was looking for... ty!
|
|
|
|
|
You're welcome
I are Troll
|
|
|
|
|
Hi all, i wondering of how i can build a SSL header (either using built in or built out function) using C#, and a same for IPSec..........
Thanks...
|
|
|
|
|
Hello,
How can i draw double dash line in gdi+ ?
It should look something like this -_-_-_-_-_ .
thanks,
berlus
|
|
|
|
|
You can simply draw two dash lines , it's easy!
modified 27-May-14 4:56am.
|
|
|
|
|
I want to create a pen that can draw the bottom an top dashed lines, and pass it to external users
|
|
|
|
|
Normally pens that draw custom dashes have their DashPattern property set and their DashStyle property set to Custom. This however only works for the horizontal plane so will not work for you.
You will need to create your own Brush (possibly based on TextureBrush ?) and pass that to a Pen constructor and return the created object as the Pen class is sealed so you cannot override the Pen default behavior.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I have more than 60 stored procedures files with .sql extension but it's really crazy to create and update every time I make changes in some of the files. Is there any way to pro grammatically import all .sql files into one .sql so I can run all in one click using T-SQL or .NET code?
|
|
|
|
|
You can do that manually with some effort. But, IMHO, checking each one on it's own should be a better idea.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
In Enterprise Manager or Management Studio or whatever MS calls it these days ...
Right Click the Database name
Click Tasks
Click Generate Scripts
There is an output option for one file.
|
|
|
|
|
no but what I need is the physical .sql files because some proceedures are not yet created...
so basically... i need to read list of all .sql in a specefic folder and then run each and every one...
or import all in one new .sql file so I can run it later..
|
|
|
|
|
|
Hello,
You can write a small program to read the files on by one and execute the script.
You can also concatenate the scripts read from files and execute a complete script.
Will that help you?
Pradnya
private void RunAllScripts()
{
List<string> scripts = new List<string>();
scripts.Add(@"D:\Scripts\Script1.sql");
scripts.Add(@"D:\Scripts\Script2.sql");
scripts.Add(@"D:\Scripts\Script3.sql");
Server server = null;
SqlConnection conn = null;
try
{
conn = new SqlConnection(sqlConnectionString);
server = new Server(new ServerConnection(conn));
foreach (string scriptFile in scripts)
{
RunScript(scriptFile, server);
}
}
catch (Exception ex)
{
MessageBox.Show("Error " + ex.Message);
}
finally
{
if (conn != null)
conn.Close();
}
}
private bool RunScript(string path, Server server)
{
string script = String.Empty;
if (!File.Exists(path))
return false;
try
{
using (StreamReader sr = new StreamReader(path))
{
script = sr.ReadToEnd();
}
}
catch (Exception ex)
{
string msg = String.Format("The script {0} not found. {1}", path, ex.Message);
MessageBox.Show(msg);
}
try
{
server.ConnectionContext.ExecuteNonQuery(script);
}
catch (Exception ex)
{
MessageBox.Show("Error " + ex.Message);
return false;
}
return true;
}
|
|
|
|
|
Hi.
I made a setup application with VS2005.
I have .NetFramWork.exe file in my computer and some others,I want to know how can i add this file to my setup program to install it, when it's installing in target computer instead of Downloading it from internet and also any other exe program that i have.
Beacuse as u know we must install .NetF.
And my problem:
I made a setup for my C# program that contain Crystal Report.
I installed .NetFramWork in target computer,But it's not working and send"Don't Send Message".It is working well in my computer without any problem and bug.
Thank u all.
CanI
|
|
|
|
|
Hi
Right click on your setup project in Solution explorer and click on properties button and in this window click on prerequisites... in new window in the listbox you can select things that need install in target computer and in buttom you should select midlle radiobutton means the setup install selected program from program's directory
|
|
|
|
|
Hi
I need a c# program that do prolog job.
I mean that this c# program should be something like prolog.
I can't find a suitable one after searching.
Can anybody help me?
|
|
|
|