|
Sql Server?
Or is the db a file in a protected folder? Remember that modifying something in the "Program Files" folder requires admin-rights.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
SQL
If it's not broken, fix it until it is
|
|
|
|
|
SQL is a language; what database (server) are you talking to? SQL Server, MySQL, SQLite, SQL CE, Access?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes it is. It's also SQL Server - which is what you asked.
If it's not broken, fix it until it is
|
|
|
|
|
..and where is the *.mdf located? Write a small console-app that only does a select, try that - does it require admin-rights? Writing to local (config?) files? Where are those located?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Whoops! My bad. I ended up looking at the 4.5 page.
|
|
|
|
|
Dave Kreskowiak wrote: .NET 4.0 is not supported on XP SP3.
http://www.microsoft.com/en-us/download/details.aspx?id=17718[^]See System Requirements->Supported Operating System
XP SP3 IS supported SP2 or before not!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Yeah, I know. I was accidentally looking at the .NET 4.5 page.
|
|
|
|
|
Yeah, I think I covered that adequately already.
|
|
|
|
|
Kevin Marois wrote: the app only runs if he runs logs into the PC as admin And what does happen if a "normal" user tries to start it? Error messages? What do the log files of your app tell you? Any entries in EventViewer?
Which type of .Net Framework 4: "full" or "client profile"?
|
|
|
|
|
I get the following. But nothing in this message points to anything in my app, that I can see:
Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 1026
Date: 05/06/2014
Time: 09:26:50
User: N/A
Computer: RDSWKS03
Description:
Application: RailDelivery.DVIRApp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle._InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
at System.RuntimeMethodHandle.InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.Signature, System.Reflection.MethodAttributes, System.RuntimeType)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at GalaSoft.MvvmLight.Helpers.WeakAction.Execute()
at GalaSoft.MvvmLight.Command.RelayCommand.Execute(System.Object)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run(System.Windows.Window)
at System.Windows.Application.Run()
at RailDelivery.DVIRApp.Application.Main()
If it's not broken, fix it until it is
|
|
|
|
|
That stack trace would indicate that the program has successfully managed to start up and the user is interacting it when it breaks - the fact it's hitting the ICommand implementation suggests this.
|
|
|
|
|
Maybe, the hit on the command could just be the initial binding. But you're right, it seems to get further along than I initially thought.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: Maybe, the hit on the command could just be the initial binding. I don't think so. The stack trace is indicating this is in response to a button click command.
|
|
|
|
|
Does that happen on that one customer's computer only, or can you reproduce it on other XP machines (setting up a Virtual Machine for such testing purposes in e.g. VMWare Player is quite useful!)?
Did you check the "zone identifier" of the dlls on the NTFS file system? I.e. a "normal" user may not be able to load them because they were "downloaded from the internet" and thus deemed dangerous, while for an admin different rules apply.
|
|
|
|
|
in my project, i need to set one datalist in secondone datalist in asp.net, but i can't...help me to solve it.
|
|
|
|
|
|
|
I am writing in VB.NET, enhancing a working program. Part of the program involves getting data from various outside sources and saving it in tables in an Access database. I am adding a new outside source (for the first time for quite a while), and am tearing my hair out trying to get code that is working with previously created DataTables and their derivatives to work with a newly created set.
I used the dataset configuration facility to create a DataTable based on a Query from my new Access table. The Access query returns all the fields of recent records in the Table and is updateable in Access. The dataset query is
SELECT PriKey, ChannelNumber, ChannelName, ReadingDate, Power FROM qryRecentSpyderData
PriKey is an AutoNumber primary key. Other than different field names, I have an apparently identical setup working without problems in another function. The failing code is:
Dim dst1 As New EnergyDataSet
Dim tba1 As New EnergyDataSetTableAdapters.SpyderMinTableAdapter
Dim tbl1 As New EnergyDataSet.SpyderMinDataDataTable
Dim rowData() As EnergyDataSet.SpyderMinDataRow
Dim rowNew As EnergyDataSet.SpyderMinDataRow
...
For intCount = intStart To 0 Step -1
rowNew = tbl1.NewSpyderMinDataRow
rowNew.ChannelNumber = intChannel
rowNew.ChannelName = minhArray(intCount).strChannel
rowNew.ReadingDate = minhArray(intCount).dtSampleTime
rowNew.Power = minhArray(intCount).sngPower
tbl1.Rows.Add(rowNew)
Next
The Rows.Add line throws a "Nulls not allowed" exception the first time through the loop. If I relax constraints, it throws a "Duplicate Primary Key" exception the second time through. I know that I haven't set the Primary Key - Access will set it in due course! I cannot see why this fails, while essentially identical code using what appears to be an exactly comparable dataset succeeds. What am I missing?
|
|
|
|
|
Well, I have a workaround - if I delete the reference to the Primary Key field in the DataTableAdapter definition, the code works and the database does get updated properly when I .Update it from the table. Since I don't need access to the Primary Key in the VB.Net code for anything, this is acceptable, but I still don't understand why the older code, whose table definitions include the relevant Primary Keys, works.
|
|
|
|
|
I am trying to create a custom ValidationAttribute in my c# .net code. I have done a lot of searching and have code that should be working but the IsValid method is not firing as far as I can tell.
Model code:
[Required(AllowEmptyStrings = false, ErrorMessage = "required")]
[ValidYear(ErrorMessage="Please enter one >= 2014")]
[Display(Name = "Exp. Year")]
public string expYear { get; set; }
And this is the class in that same model:
public class ValidYearAttribute : ValidationAttribute
{
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
return new ValidationResult("Something went wrong");
}
}
Hopefully someone can help figure out why the IsValid is not firing.
Thanks
Mike
|
|
|
|
|
Hi,
I am developing an application in c#.net where I need to include the accounting information/transactions along with other data.
How this can be done? Please help.
Thanks in advance,
Guru.
|
|
|
|
|
There is not enough information in your question to be able to offer a reasonable response. If you have a specific programming problem then please provide clearer details. If you wish to learn accountancy then this is probably not the best place.
|
|
|
|
|
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
con1.Open();
SqlCommand cmd4 = new SqlCommand("UPDATE candidate_personal_details SET GUARDIAN_NAME='" + TextBox23.Text + "',GUARDIAN_PH_NO='" + TextBox24.Text + "',GUARDIAN_MOB='" + TextBox25.Text + "',NATIONALITY='" + TextBox26.Text + "', GENDER='" + DropDownList1.Text + "',D_O_B='" + TextBox27.Text + "' , PRESENT_ADDRESS='" + TextBox28.Text + "',DIST1='" + TextBox29.Text + "' ,PIN1='" + TextBox30.Text + "',PERMANENT_ADDRESS='" + TextBox31.Text + "',DIST2='" + TextBox32.Text + "',PIN2='" + TextBox33.Text + "',LOCAL_GUARDIAN_NAME='" + TextBox34.Text + "',LOCAL_GUARDIAN_ADDRESS='" + TextBox35.Text + "' ,DIST3='" + TextBox36.Text + "',PIN3='" + TextBox37.Text + "' ,LOCAL_GUARDIAN_PH_NO='" + TextBox38.Text + "' ,LOCAL_GUARDIAN_MOB='" + TextBox39.Text + "'WHERE EMAIL_ID='" + TextBox21.Text + "'", con1);
SqlCommand cmd5 = new SqlCommand("UPDATE educational_details SET X_N_O_INSTITUTION='" + TextBox40.Text + "',X_N_O_BOARD='" + TextBox41.Text + "',X_Y_O_PASSING='" + TextBox42.Text + "',X_O_MARKS='" + TextBox43.Text + "',XII_N_O_INSTITUTION='" + TextBox45.Text + "',XII_N_O_BOARD='" + TextBox46.Text + "',XII_Y_O_PASSING='" + TextBox47.Text + "',XII_O_MARKS='" + TextBox48.Text + "',G_N_O_INSTITUTION='" + TextBox50.Text + "',G_N_O_BOARD='" + TextBox51.Text + "',G_Y_O_PASSING='" + TextBox52.Text + "',G_O_MARKS='" + TextBox53.Text + "'WHERE EMAIL_ID='" + TextBox21.Text + "'", con1);
// SqlCommand cmd3 = new SqlCommand(sql2, con);
cmd4.ExecuteNonQuery();
cmd5.ExecuteNonQuery();
con1.Close();
Label66.Text = "data is updated successfuly...";
// cmd3.ExecuteNonQuery();
}
|
|
|
|
|