15,892,927 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 Member 12561559 (Top 49 by date)
Member 12561559
2-Jun-23 6:30am
View
tried that, didnt work in the telerik component. Found the solution below - sods law I find it shortly after posting here. But might be useful for others hitting the same bug.
Member 12561559
2-Jun-23 6:30am
View
Found out how to go about fixing it.
I'll explain the solution in a moment, but this is how I found it:
After doing a manual edit in a radrichtextbox and making it do a single line entry rather than a huge gap - I exported the contents BACK OUT as a HTML file and took a peek at the coding.
There were several CSS entries with a paragraph between each table.
It all boiled down to this,
a css entry:
.psmall { line-height: 1.15;
then at the end of each table putting this:
</table><p class="psmall "><span> </span></p>
and theres just a small gap now between tables.
Member 12561559
12-Dec-22 8:25am
View
Managed to do testing with mailkit to, using the authentication saslmechanismoauth2 statement above, so im definitely getting a auth token back successfully, just an issue with permissions to send email - so I think thats at the Office365 Outlook end. Thanks Richard - you were most helpful - top fella
Member 12561559
12-Dec-22 3:33am
View
How will I know if its set to read-only ? Ive had a guy who has access to the office365 website and he's put in smtp.send and mail.write as scopes, but he's not a manager of email, he's had the job dumped on him, so we're trying to figure it out together but its like the blind leading the blind, even following examples given by chilkat and other websites regarding setting up.
Member 12561559
6-Dec-22 10:55am
View
That was a nightmare but I figured it out - your code helped find the vb.net equivalent - so I will post this as the solution, people can then just re-use it to get the authtoken, then use whatever email component they use, passing the json authtoken as needed. Thanks Richard - took me a while (all day) but got there in the end - or seems it, I have managed to get the authtoken, I just have to pop it into my main sub's that performs outgoing mail using the Chilkat Software component which will just (supposed) to use the Authtoken json string and do its magic. Cheers
Member 12561559
6-Dec-22 7:25am
View
Hi Richard, thanks for that - Ive managed to get it onto a test project for v4.8 winforms vb.net but I dont necessarily need all the email part of it - just the essential parameters I should be passing, without having an account selection - if I do the account selection i.e. click on it, then Im in and I get a json authtoken string, I guess I could save it and just reuse it until it expires, but I'd rather would be able to refresh it everytime it connects, so I dont have to do something about updating it every X days. I would rather not go the way of credentials as in the login and password either, Im just throwing it "out there" to see what I can replace that with. Thanks though and if you are able to just let me know what I need to get this auth token using the libraries that come with .net 4.6/4.8 that would be perfect.
Member 12561559
5-Feb-21 3:54am
View
Will do Dave ! Thanks fella
Member 12561559
4-Feb-21 7:56am
View
Correct, not just monitoring TM, but getting a window handle error as well, before the app completely shuts down - as per my reply to Griff above, I am also connected to MySQL with one connection made when the app starts and that is left open throughout the entire session of app usage. I have checked all my adapters to make sure I am disposing them correctly so perhaps it is something on that side of things. Thanks Richard - most appreciated that you replied
Member 12561559
4-Feb-21 7:55am
View
Hmm. Thats what I thought as I have read that, but I am getting "could not get a handle on the window" type errors and eventual shut-down of the app itself - it is connected to MySQL though, perhaps it is how I am utilising it - I have one connection that is made during the start of the application, perhaps I should be opening and closing only when I am actually doing anything with it - I'll do some searching on that side. Memory is disappearing somewhere to the point it has a moan about handling the window and then closing the app completely. Thanks Griff
Member 12561559
19-Feb-20 10:00am
View
Thanks!
Member 12561559
19-Feb-20 3:43am
View
Thanks! sorry I could not give you the accept solution, just griff got in there first - otherwise, 5 stars from me :)
Member 12561559
19-Feb-20 3:42am
View
Ok, that makes sense to be honest. So again, as Im trying to implement the parse for most things as convert.to is outdated from a previous question I supplied that someone mentioned - I have a date:
Dim CleanDaysToGo as int32=0
CleanDaysToGo = NextCleanDate.Value.Subtract(Now).TotalDays
doesn't work because of datetime issues, so utilising the parse.datetime and parse.int32 to turn the result into an int32 on the outer, like so:
Dim CleanDaysToGo as int32=0
CleanDaysToGo = Int32.Parse(DateTime.Parse(NextCleanDate.Value.ToString).Subtract(Now).TotalDays.ToString)
NextCleanDate is a of nullable datetime equal to say, 25 february 2020 - so 6 days from now - and CleanDaysToGo should hold that value - but it flops with an error, only on the runtime with "input string is not in correct format".
Sorry to seem so dumb with this and following up a question, with a question, but it might be useful for others who run into the same issues. :) Cheers
Member 12561559
7-Feb-20 12:10pm
View
Thanks Phil - I'll take a look at that, never heard of these collections before, hopefully I can get them to work with what I have - will be better than a wait state on the threads due to timings being important in what I am trying to achieve - thanks and have a good weekend !
Member 12561559
7-Feb-20 12:08pm
View
Cheers Richard, I thought it would be that, though Phil seems to have a threadsafe method below, Ive googled it, it doesnt seem to get used a lot, perhaps most people dont use threads and lists but I'll take a look at his solution and if I cant get that method around my head, I'll go for a wait (though I'd prefer not to as timings are important on these threads) - but at least there are a couple of things I can look at. Cheers and have a good weekend :)
Member 12561559
3-Feb-20 8:45am
View
Will start using the Parse/Tryparse more than the convert - thanks for the headsup - re. the Int64 in the class, I did do that but it still didnt work - some dodgy character in there that came from "somewhere". :S But parse/tryparse - yep - thats a thumbsup from me Phil
Member 12561559
3-Feb-20 8:44am
View
Gawdang it ! I can only think they came from me typing them into windows 10 Calc and copy paste and then remove the "," between the millions and hundreds of thousands. Good spotting fella - I thought I was losing my mind !!!! hahahah. Thanks ! I can go back to bed soon. lol
Member 12561559
3-Feb-20 7:34am
View
Conks Out, explodes, does not work, error about not being able to convert string.
Member 12561559
4-Jul-19 9:43am
View
Thanks Griff, thank you very much. I will read up on those styles to see what else I can get from them. Cheers. Carl.
Member 12561559
5-Feb-19 7:54am
View
Thanks Macej - just what I needed and Im getting there (I think!) - most appreciated !
Member 12561559
5-Feb-19 7:53am
View
The poor user is me unfortunately hahaha, no seriously, the list contains a bunch of files I have backed up (18 million of the suckers) so yes, although I am not viewing them all, I do need to copy the selected DGV list into a managable list :)
The reason why so many records, is that, although there are various filters I utilise to narrow down the amount of records, selecting all in one go an then removing a few that I dont want, works out perfect.
As for the loop part of it - the linq is a thousand times faster than looping through all selected rows via a for next, took about 2 seconds to select 171,500 ID values.
Thanks Griff - I knew it was something simple - Im new to the lists thing (new to vb.net really only been using it a year and unfortunately have 20 years of bad vb6 habits to get rid of!). Thanks again !! :)
Member 12561559
31-Jan-19 1:43am
View
Thanks and yes, I got the values around the wrong way thanks Patrice! So if its 2^15 then it is 32768 times? Thats what the ^ calc says?
Member 12561559
31-Jan-19 1:42am
View
Have updated my question to include changes proposed, but still not luck :(
Member 12561559
4-Oct-18 10:14am
View
I just started that before spotting your reply :) I've broken it back down. Basically the example I have given you is a simplified version of what I am actually work on, if we swap homes for "Property" and "People" for "Product", Country, County and City for Level1,Level2 and Level3 I now have:
SELECT DISTINCT Property.PropertyRef
FROM Level1 INNER JOIN
Level2 ON Level1.Level1Ref = Level2.Level1Ref INNER JOIN
Level3 ON Level2.Level2Ref = Level3.Level2Ref INNER JOIN
Property ON Level3.Level3Ref = Property.Level3Ref INNER JOIN
Product_Operator ON Property.PropertyRef = Product_Operator.PropertyRef INNER JOIN
Product ON Product_Operator.ProductRef = Product.ProductRef
WHERE (Product_Operator.ProductRef IN (125, 111))
GROUP BY Property.PropertyRef
HAVING (COUNT(Product_Operator.ProductRef) = 2)
this shows me a list of Properties/Homes that have what I am looking for, but by god it wont let me group it into Country - which is what I will try and work on next - I'll save this bit of SQL so I can return to it when I make a dogs dinner out of trying to expand on it - if I do find the answer then I'll post it up -Thanks Mr.Griff - will give it another go!
Member 12561559
4-Oct-18 9:51am
View
Thats great and nice article you wrote there :) I understand how Group By works (and even more so now thanks to your article) so removing the HAVING altogether, I ended up with a count of each time People were living in the house - however, I dont want to count how many people are in the house (in my query above, 2 people) I am getting two results - if I added in a Child Female or Child Male - my counts go up even further - I dont want that ,what I want to do is count the amount of homes, that a Male and Female reside at and count the home once.
For example, if I had
Home A contains 1 Male Adult, 1 Female Adult
Home B contains 1 Male Adult
Home C contains 1 Female Adult
and Home D contains 1 Male Adult, 1 Female Adult and 2 Female Children
and I was to perform a SQL Group By Having clause to see how many homes had 1 Male Adult and 1 Female Adult in there I should see a results list of
Home A and Home D
Counting 2 homes
Doing it by Country, if Home A and Home D were in 2 different countries I would want to see 1 count per country but if they were in the same country, different counties and different cities, I would want to see a count of 2 for that country.
Member 12561559
4-Oct-18 8:17am
View
I just get one record back, with just a total of 1 when I know I have a lot more than that in the data. I had to take the CountryRef out of the select as well as SQL moaned about aggregate in the select.
Member 12561559
4-Oct-18 7:50am
View
The only thing I can think of is to move the Invoice Due date into one of the first 3 cells so it gets picked up by cellformatting and is an almost guarantee that its not going to fall off out of visible row.
Member 12561559
24-Sep-18 12:04pm
View
Have revised my question, I didnt make it clearer enough - thanks and I hope you may be able to help ! :)
Member 12561559
26-Jul-18 11:28am
View
Sorry I meant, I would leave out the N part i.e. update abc set mytext=N'some unicode chars' to update abc set mytext='some unicode text' would be fine for unicode now - cheers
Member 12561559
26-Jul-18 11:27am
View
Thanks Richard! Most appreciated
Member 12561559
26-Jul-18 11:26am
View
Sorry, I would have put the LIMIT at the end of the statement but remove the TOP N out of the statement. By the looks not much has to be done ! Thanks for your input
Member 12561559
13-Jul-18 13:36pm
View
Thanks but I have already visited that page and applied a similar solution, even though the .net class is not ado reliant. I have updated the question, several windows updates have gone on today so it may be related, am just about to go read up on them
Member 12561559
20-Mar-18 8:26am
View
using my code i get: object reference not set to an instance of an object - i know the object exists as ive populated it. though i'm probably being dull somewhere along the line.
I am trying to update the datatable - from a different form,
the facility_table datatable is declared on one form as so:
Friend Facility_Table As New DataTable
and im updating it with (for example):
Dim MyRow() As Data.DataRow
MyRow = Form2.Facility_Table.Select("FacilityNameRef=123")
MyRow(0)("Locked") = 0
and using just MyRow("Locked") = 0 as per your recommendation, i get a red underline in the IDE saying "integer cannot be converted to datarow)
Member 12561559
30-Jan-18 11:50am
View
nvarchar for small fields like names, ntext for larger blocks of texts (under 3000 chars) but in various languages, as far as collation, I presume its whatever is default (uk english). I just tried feed a manually pasted bit of chinese (looks ok) in vb.net as a parameter text field to go straight into the report, bypassing any sql server data - and it still comes out in squares so its definitely nothing to do with collation on SQL.
Member 12561559
24-Jan-17 8:19am
View
Hi Jorgen, will modify question to show what is in there, so its visible to everyone
Member 12561559
24-Jan-17 4:49am
View
Data is fine, double check with a physical look plus I run your select statement, had to put in a join in the FROM section and include a Propertyref in the OR sections, but I had my 3 records back, with the YES, NO's correct. Going to explain it better by modifying my question, I know it will be me so thank you for getting back, your time is most appreciated.
Member 12561559
24-Jan-17 4:46am
View
Data is fine, I'll change the SELECT * to a SELECT 1 to improve performance - can always do with performance improvements :) I'll see if I can put it better below or use the improve question option. Thanks for getting back
Member 12561559
24-Jan-17 4:45am
View
data is fine, i've hand-modified the data so i could get results and then change values to not get results, as a test. I can't simplify the data otherwise that would defeat the objective, I'll see if I can explain it better, below - thanks for replying though - I do appreciate the time you put in to reply
Member 12561559
18-Nov-16 1:36am
View
Perfect. You have been most helpful Richard, thank you very much.
Member 12561559
17-Nov-16 11:37am
View
Would you mind answering one more question - more for my sanity than anything.
I have converted my code so I do not have a Public oledb connection, but instead use the USING block to open and do some work - however, I do need to call other functions in my DLL and have got it to pass the OLEDB connection opened in the USING statement, across to those functions - will that keep it thread safe or do I need to do more USING blocks in those separate functions to open up a new connection and close it when its finished?
Member 12561559
17-Nov-16 10:57am
View
I think I need to do a lot more reading, the differences on how .NET handles DLLs and VB handling DLLs is very different, even though the set up is very similar. I seem to be getting threading issues on database connections, yet the same code in VB runs fine without the same issues. More reading me thinks - anyway, thank you very much Richard - I have a lot of things to read and think about. Your time has been most appreciated :)
Member 12561559
17-Nov-16 10:10am
View
Thanks! The reason I am asking is this: In vb6 I write a DLL, deploy it on IIS6 (yes we seriously need to update) and everything runs fine there are no conflicts i.e. everything running in a DLL for a user connected on a session is "their" DLL, all variables belong to that particular user, but since using VB.NET Im getting an idea (from what I am reading, though I may be misunderstanding) that if I have a DLL and is has some public variables declared, that even though there are multiple users, that one user that has accessed our DLL, may be getting the values of that public variable that another user, on a different session but still accessing the DLL, is getting - does that make sense? Sorry if I sound confusing. Basically because of the multiple threading of VB.NET, that anything declared as Public, is available to all that access that variable. Im going to write a simple test to see if that is indeed true. Its mindboggling moving from VB to .NET as far as .COM aware .NET DLLS (which is what I am having to do).
Member 12561559
17-Nov-16 9:30am
View
Sweet. That is great. Thanks!!!
Member 12561559
17-Nov-16 9:19am
View
The only thing that will be an issue with making the opening connection more often rather than something global, is that I will opening and closing connections - an awful lot. Is this something I just have to accept and put up with?
Member 12561559
17-Nov-16 7:45am
View
I have read that (thank you for the link btw), but it doesn't really say about a database connection. Whether it is re-created (I think it is if its BYVAL) or if it is re-used (BYREF) - I am only asking because I have recently moved from VB6 to VB.NET and am still trying to grasp how things work and just wanted a confirmation on whether I have understood that correctly? Thanks!
Member 12561559
17-Nov-16 5:45am
View
Thanks Richard, I have updated the question - other searches have led me to the Using statement as well - if you wouldn't mind a response to what I have done - I am probably using old bad habits from VB and although its working in .NET, its not working "well". Thank you - I really appreciated the time you're putting into responses.
Member 12561559
16-Nov-16 8:54am
View
I know the code works as it runs fine locally. The only thing I can see that is common where the errors have been occurring, and I dont know if this makes a difference or not as it has worked perfectly fine in VB6 and fine locally, is that I am passing a oledb.connection through a function parameter. I'll strip them out and globally declare the oledb connection. Will update this thread if that sorts it out. Thanks for getting back to me though, most appreciated.
Member 12561559
16-Nov-16 8:53am
View
I know the code works as it runs fine locally. The only thing I can see that is common where the errors have been occurring, and I dont know if this makes a difference or not as it has worked perfectly fine in VB6 and fine locally, is that I am passing a oledb.connection through a function parameter. I'll strip them out and globally declare the oledb connection. Will update this thread if that sorts it out. Thanks for getting back to me though, most appreciated.
Member 12561559
17-Jun-16 4:11am
View
If I go to install the sqlite package on the fresh vm win10 machine, but then cancel when the installer pops up, my app then works. The sqlite installer is doing something that my app isn't doing.
Member 12561559
15-Jun-16 2:15am
View
I set the prerequisite on the sqlite in the properties of the project but when I tried to install it on a fresh machine, I got a pop up message saying "cannot install, no sqlite" and going on about it needs to be installed in the GAC.
If you can tell me how to add the sqlite setup to the prequisite as there were no options to add the sqlite installer manually to my setup, or another alternative that would be great. What a pain eh! lol
Show More