15,890,438 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by xTMx9 (Top 60 by date)
xTMx9
25-Mar-24 5:16am
View
I have searched for the error before and found many ways to fix this error but none worked. I tried again and found a hint in one of the searches from your link. The fix was simply to add the ngFileUpload to the app.ts file in the other used module. That fixed the problem.
Thank you.
xTMx9
26-Oct-23 9:34am
View
Thanks for the info, I ended up removing the js file approach altogether and directly sending the request through form. I got back the correct file with no errors.
It seems like the main issue was with handling the file in the js script, couldn't find a fix.
xTMx9
25-Oct-23 6:07am
View
I believe the problem could be in the js script, do you advise or know of a different way to handle the file download?
xTMx9
24-Oct-23 4:18am
View
Yes,I guess it is being badly built, I changed the extension to xls and this is what I get:
https://imgur.com/a/PrEV7Dg
The file opens but it is not filled with correct data, it is also supposed to just download an empty excel file since I am just testing it now.
Do you recommend to change something or know why is this happenning?
xTMx9
23-Oct-23 12:30pm
View
I only saw others using blob when doing such operation and didn't find results for another approach.
I have added a link to a screenshot of the result of the "data" object on the frontend, it might help.
xTMx9
20-Oct-23 8:38am
View
I can't save the file on the server itself, only download the file directly on the user's browser.
xTMx9
20-Oct-23 8:36am
View
Unfortunately, that didn't work.
xTMx9
19-Oct-23 10:45am
View
Unfortunately, this didn't fix the issue.
xTMx9
26-Sep-23 5:34am
View
Thanks for the clarification, I got it.
xTMx9
25-Sep-23 5:20am
View
Hello! I have updated the question and added a code part.
I have a "using var stream = new MemoryStream();" part in the class.
So I assume at the end of this method, the object is getting disposed? Is there a good way to pass the stream to the 2nd class without it being disposed?
xTMx9
2-Jul-23 12:46pm
View
Thanks for the detailed answer.
xTMx9
29-Jun-23 7:16am
View
Thanks for the answer!
I would also like to know if it is possible to group the results of tcGroup list in my code by the country name, it should have just 3 entries, right now, it is showing all countries in duplicates for each store there is. In the picture here it should show just 3 when debugging: https://imgur.com/a/xicFx1S
It should not show [0..99] and more rows like that, it should already group them and just show:
[0]
[1]
[2]
and inside each of these, the data of cities and stores would be in them.
xTMx9
28-Apr-23 8:53am
View
Hello,
Do you mean this:
[NotMapped]
public class CalculateTurnoverEntryModel : TurnoverEntry
{
public decimal? Turnover { get; set; }
}
I have a class for it. I will also add it to the question
what can be done or provided to further try and find a solution for this error?
xTMx9
19-Apr-23 5:19am
View
Thanks for the clarification and solution, appreciated.
xTMx9
19-Apr-23 4:32am
View
Thanks for the answer, changing it to scoped resolved that particular issue.
The main problem now is with the 1st query, it is throwing the following error in the console:
"System.InvalidOperationException: The LINQ expression 'DbSet<transactiondataentry>()
.Where(t => t.Active && t.EntryStatusId != 5 && t.RentAgreementRateId == __baseRentAgreementRateId_0 && DbSet<rentperiodrelation>()
.Where(r => EF.Property<int?>(t, "Id") != null && object.Equals(
objA: (object)EF.Property<int?>(t, "Id"),
objB: (object)EF.Property<int?>(r, "TransactionDataEntryId")))
.OrderBy(r => r.PeriodDate)
.Select(r => r.PeriodDate)
.SequenceEqual(__basePeriods_1))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'."
I am calling it explicitly with "AsEnumerable but it seems to not get to it.
Do you recommend a way to checking and solving this?
xTMx9
18-Apr-23 9:57am
View
This is a project that I newly took over so my knowledge of it is limited. I have checked the program.cs file and all services are registered as "Transient" in it.
What part of the project could I add to the question in order to make it clearer?
I noticed an error in the first query in the question which I added as a comment above this one.
Could they be connected? and what could be causing it?
xTMx9
18-Apr-23 9:40am
View
There seem to appear the following error on the 1st query: "could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'."
I do have it "AsEnumerable" but still getting this message.
I do not see what's wrong with the code to not be translated.
xTMx9
3-Mar-23 7:38am
View
I found the issue to be here
CreateMap<turnoverarea.turnoverentryviewmodel, turnoverentry="">()
.IncludeBase<baseentryviewmodel, basesalescalculatedentry="">()
.ForMember(dest => dest.FixRent, m => m.MapFrom(src => src.FixRent))
.ReverseMap();
But I don't know why it is occuring now after I migrated to .net 6
xTMx9
30-Aug-21 3:10am
View
Deleted
ng-if="(${this.dateToCompare} > ${row.CreateDate}).....
row.CreateDate is an IsoString, I am not sure how to convert it from within the ng-if
xTMx9
30-Aug-21 3:09am
View
Deleted
Hello,
Ok then how can I change the following to a date format so I can compare it?
xTMx9
6-Mar-19 4:03am
View
only a few users use that form and its faster for them that way, "Enter" from previous box, type in bunch of numbers quick then Enter, rather than clicking on a control
xTMx9
5-Mar-19 6:58am
View
I'm using a TextBox because there are many textboxes in the form and the user has to be fast in entering the data and switching from one to another so figured having a masked textbox would be faster.
I have not used DateTimePicker control much before so I'm not sure if text can be entered like that of a textbox or have to always choose from the calendar.
xTMx9
5-Mar-19 6:56am
View
Had to edit the code and using a parameterised query solved the problem, thanks.
xTMx9
30-Mar-17 3:50am
View
Thanks for both replies but can you explain a bit more? and where should I place that code?
xTMx9
29-Mar-17 3:51am
View
Ok, got it...Thanks. :)
xTMx9
25-Mar-17 11:25am
View
changing the URI2 to that doesn't work, it tells me "expected a ;"
xTMx9
24-Mar-17 15:11pm
View
nvm, everything works fine now....
string URI2 = "http://localhost:1891/api/test/combofill/"+id.ToString();
edited this line.
xTMx9
24-Mar-17 14:14pm
View
Thanks for the reply, I updated the question and added more details after what I tried.I think it's more clear now.
xTMx9
24-Mar-17 12:14pm
View
added the URI to the question
string URI = "http://localhost:1891/api/test";
xTMx9
24-Mar-17 5:40am
View
I'm still new to api so what code should I post here?
string URI = "http://localhost:1891/api/test";
xTMx9
24-Mar-17 5:36am
View
how can I do that?
for example my URI is "localhost\api\test"
how to reference the other one?
xTMx9
15-Dec-16 8:46am
View
ok thanks... it's my first time so i thought the problem is on my side.
xTMx9
12-Aug-16 11:48am
View
that's from where i downloaded the drivers... and followed the "outdated" read me step by step as shown in the pics i uploaded. I'm using x64 architecture for php so i chose those 2 files with x64 andd tried all of them.Non worked.
It's really sh***y that it's 2016 and the process of getting sql server to work with php is still hard and complicated.
Although i have to work on sql server instead of mysql,i think i'll use mysql if i don't figure out the problem by tomorrow.
xTMx9
12-Aug-16 11:19am
View
i want to make sure i have the correct sql drivers installed. can you check it for me (links are safe ,imagesuploaded to imgur)
here's the files i downloaded from Microsoft's website:
link
And here i moved the non thread safe x64 dlls to php ext directory:
link
Finally i added them to the extensions in php.ini :
link
anything more i need to do? because i still don't have anything related to sqlserv when i go to phpinfo() page on the server!
xTMx9
12-Aug-16 11:16am
View
i want to make sure i have the correct sql drivers installed. can you check it for me (links are safe ,imagesuploaded to imgur)
here's the files i downloaded from Microsoft's website:
link
And here i moved the non thread safe x64 dlls to php ext directory:
link
Finally i added them to the extensions in php.ini :
link
anything more i need to do? because i still don't have anything related to sqlserv when i go to phpinfo() page on the server!
xTMx9
11-Aug-16 16:58pm
View
I have this login in the sql server security folder under logins folder :
IIS APPPOOL\DefaultAppPool
xTMx9
11-Aug-16 16:52pm
View
i'm using IIS to connect to database. IIS can already access the database in another application(Asp.net) so access is already granted,is it right?
xTMx9
28-Jul-16 16:30pm
View
This worked for me instead of the solution
xTMx9
29-Jun-16 8:37am
View
Can you help me with my question here please: http://www.codeproject.com/Questions/1109458/How-can-I-move-forward-and-backward-through-rows-o
xTMx9
29-Jun-16 8:14am
View
yeah but what about the error i am getting when placing post back only for MaxRows = tbl.Rows.Count
inc = -1
why isn't it working?
what's the mistake in my code in the question? i really don't know why it is happening!
xTMx9
29-Jun-16 8:04am
View
I added this here(The postback):
instsqlconnection.Close()
If Not Page.IsPostBack Then
MaxRows = tbl.Rows.Count
inc = -1
End If
But now the next button is showing me the 2nd record and the last button is giving me this error: There is no row at position -1.
Placing the If not postback on the whole PageLoad code will give me this error on all buttons: Object reference not set to an instance of an object.
xTMx9
29-Jun-16 7:39am
View
i added more detail in the qustion,maybe it will help.
maybe it is something about the inc not incrementing correctly?or it returns to -1 everytime i click the button.
xTMx9
29-Jun-16 7:30am
View
Your code is very similar to what i wrote,but anyway i tried it but still getting the same results.Only the First and Last buttons are working!
I added more detail in the question.
xTMx9
28-Jun-16 12:41pm
View
Deleted
the console.writeLine and Response.write (tried both) are not working(nothing is displayed on the screen),anyway u can help me how to display data from the grid to the page the user is viewing??
This is the code:
Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDLGarages.SelectedIndexChanged
Dim GID As Integer = DDLGarages.SelectedValue
Dim connetionString As String = Nothing
Dim connection As SqlConnection
Dim command1 As SqlCommand
Dim adapter As New SqlDataAdapter()
Dim ds As New DataSet()
Dim sql1 As String
connetionString = "Data Source=.;Initial Catalog=MySetOfGarages;integrated security=true"
connection = New SqlConnection(connetionString)
connection.Open()
sql1 = "SELECT idGarage,referenceVehicle,PriceOfRepair FROM repair WHERE idGarage='" & GID & "'"
command1 = New SqlCommand(sql1, connection)
adapter.SelectCommand = command1
adapter.Fill(ds, "GInfo")
adapter.Dispose()
connection.Close()
Grid1.DataSource = ds.Tables(0)
Grid1.DataBind()
Console.WriteLine("The number of records in the Grid : ", Grid1.Rows.Count.ToString)
Dim Sum As Double = 0
For Each row As GridViewRow In Grid1.Rows
Sum = Sum + Double.Parse(row.Cells(3).Text)
Next
Console.WriteLine("The Sum of all RepairPrice is : ", Sum.ToString)
End Sub
xTMx9
25-May-16 15:30pm
View
It was a mistake on my part,i figured it out...
i had 'Name=' instead of 'EmailAddress=' in the select statement!
Anyway Thanks for your help! :)
xTMx9
25-May-16 15:25pm
View
Deleted
you mean run the code with debug on?
xTMx9
25-May-16 15:19pm
View
a number(integer)
xTMx9
25-May-16 15:18pm
View
Now it works correctly! Thanks!
xTMx9
25-May-16 15:17pm
View
Deleted
Now it works correctly! Thanks!
xTMx9
25-May-16 15:13pm
View
a string taken from a label in this case: 'abc@gmail.com'
If i remove the if statement an error occurs.Searchedvalue is always getting zero no matter what
xTMx9
25-May-16 15:10pm
View
It is working now but the sum is now incorrect since the value is ID and not the price
sum = sum + CInt(CurrentItem.Value)
xTMx9
25-May-16 15:04pm
View
Now i Understand,but in addition to
ListBox1.DataTextField = "PhoneName"
ListBox1.DataValueField = "PhonePrice"
(i need the price elsewhere so i can't remove it)
how can i also get the ID(which is the PK) to be sent to the listbox?
xTMx9
25-May-16 14:56pm
View
The Customer_Detail table is already filled,but the above code is not getting the correct id,after removing the relationship it works but it is always inserting zero(the SearchedValue is always getting zero as its value) so something which is in my fetching code isn't right,and i cannot figure out howit should be written
xTMx9
25-May-16 14:10pm
View
Any chance you know why it is happening?? (the error posted in my code below?)
The Problem iss somewhere here:
Dim rows() As DataRow = ds.Tables("logins").Select("Name = '" & Name & "'")
Dim searchedValue As Integer
If rows.Count > 0 Then
searchedValue = CInt(rows(0).Item("LoginID"))
End If
If i remove the if statement,i will get an indexout of range error....
xTMx9
25-May-16 14:03pm
View
I uploaded an image here's the link: http://i.imgur.com/Nmr1gG2.png?1
xTMx9
25-May-16 13:51pm
View
I added a new code if it makes things clearer about what is supposed to happen
xTMx9
25-May-16 13:50pm
View
when i choose the first item from the listbox,it is correctly printed in the label but if i choose the 4th item ,it doesn't choose it instead chooses the 1st item(even if i choose the 7th item it instead chooses the 5th one) although choosing the first 3 items works and are placed in the Label!
xTMx9
25-May-16 12:38pm
View
I removed the "New dataTabele" altogether ,i updated the code so now it looks like what i have(it is working) but when it reached the last line(adapter.update.....) an error occurs:
<pre>The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CustomerOrders_Customer_Detail". The conflict occurred in database "Shop", table "dbo.Customer_Detail", column 'LoginID'. </pre>
here is the 2 tables in my database:
Customer_Detail(LogInID pk,EmailAddress,Password,Name,DOB)
CustomerOrders(OrderID pk,logIn (foreign key),PhoneNames,TotalPrice)
i am suspecting that something is wrong with my code where i get the ID that matches the name sent by the function... or is there something else? It's so frustrating for the program to break just at the last line :(
xTMx9
25-May-16 11:45am
View
I used the .ToArray() now and it is working but getting an error when reaching this line:Dim rows() As DataRow = table1.Select("Name = '" & Name & "'") error:Cannot find column [Name].
How can i place Name to be the string taken from the function?
xTMx9
25-May-16 11:40am
View
i got it now like this: Dim SlctdPhones As List(Of String) = CType(Session.Item("SlctdPhones"), List(Of String))
How can i send it to the function now? there is an error below "SlctdPhones"(the parameter of the function) ....and how is a list is taken as an argument in the function?
Show More