15,900,461 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 12931315 (Top 22 by date)
Member 12931315
12-Sep-20 3:06am
View
Hi
thanks for replies
this is what I tried
CREATE TABLE #tempTable1 (
Token_no char(6),
date date,
time char(4))
CREATE TABLE #tempdata (
Token_no char(6),
date date,
time char(4))
insert into #tempdata (Token_no,date, time) values ('00001','2020.01.01','0700')
insert into #tempdata (Token_no,date, time) values ('00001','2020.01.01','1200')
insert into #tempdata (Token_no,date, time) values ('00001','2020.01.01','1245')
insert into #tempdata (Token_no,date, time) values ('00001','2020.01.02','0500')
insert into #tempTable1 (Token_no,date, time)
select #tempdata.token_no,#tempdata.date,#tempdata.time from #tempdata
left join #tempdata t1 on t1.date =#tempdata.date and t1.token_no =#tempdata.token_no
select * from #tempTable1
drop TABLE #tempTable1
drop TABLE #tempdata
please help me
Ajith
Member 12931315
8-Sep-20 10:54am
View
Hi OriginalGriff
Thanks for answering , It's for my course activity
I am beginner for SQL query , I do not know how to do a while loop
just tell me how to loop through that table that will help me
Thanks
Ajith
Member 12931315
27-Sep-18 12:22pm
View
Thanks for replying,I googled but only written in 2009 and 2011 give processor warning, any recent work even with grid view.
Member 12931315
27-Sep-18 12:19pm
View
Windows Forms
Thanks
Member 12931315
2-Jun-17 16:13pm
View
Thanks, but I am using dataset rows, is there reader function in rows
Ajith
Member 12931315
28-May-17 12:44pm
View
Thank you very much for reply
Sorry I didn't put whole code , It's already in foreach loop
there I take token_no and date to while loop for token_no because, there are several token_no's in a day ,once I worked with current one, I want move next line (record)
Is that possible in while loop
Thanks
Ajith
Member 12931315
28-May-17 6:19am
View
Yes,It's working
Thank you very much
Ajith
Member 12931315
28-May-17 5:43am
View
I am inside foreach loop then I am calling a function going out of loop
once inside function I want to get value of column in current table to
variable ,As I am new c# I don't know right syntax to call current row
Thanks
Ajith
Member 12931315
25-May-17 15:02pm
View
Thanks Matt, I put that comment only for the question
Member 12931315
25-May-17 15:00pm
View
Holy cow I didn't notice that,problem solved
thank you very much.
Member 12931315
25-May-17 14:35pm
View
Thanks, but I tried result is same
Ajith
Member 12931315
25-May-17 14:34pm
View
Hi Griff
I tried that it's still it's say operator '==' cannot be applied to operand string
is there any better way ?
Thanks in advance
Ajith
Member 12931315
18-May-17 12:43pm
View
Thanks Griff,Ryan,phil I will try that
Member 12931315
11-May-17 9:28am
View
Now I found It application in break mode, there is option asking to continue
I click and It's working, Is it a visual studio problem ?
Ajith
Member 12931315
11-May-17 9:17am
View
while! null
foundRows = this.timeattDataSet.Tables["Data"].Select("Token_no= @cToken and Date = @datetime and Time = @cTime");
if foundRows == false
'write to data file'
Member 12931315
11-May-17 9:13am
View
Hihope error list is not that long.
without checking row exist I can write over 30000 records
with check only 109 records written and break
Thanks in advance
Ajith
Member 12931315
11-May-17 9:07am
View
Managed Debugging Assistant 'ContextSwitchDeadlock' : 'The CLR has been unable to transition from COM context 0x1801160 to COM context 0x18010a8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.'
Member 12931315
11-May-17 8:50am
View
Hi Richard
Thank you very much Richard it's working
only problem is it enable to write several record in while loop and
give break error any idea why is that ?
Thanks again
Ajith
Member 12931315
11-May-17 5:46am
View
Hi Griff
I have problem, I want to see if record exists before I write new one
I convert text file that you helped me and loaded a line to variable
and tried this
cToken1 = str.ToString().Substring(0, 9).Trim();
cToken2 = '5' + cToken1.PadLeft(5, '0');
cToken = cToken2.Substring(0, 6);
cDate = str.ToString().Substring(10, 10);
cTime = str.ToString().Substring(21, 2) + str.ToString().Substring(24, 2);
cIdno = str.ToString().Substring(30, 1);
datetime = Convert.ToDateTime(cDate);
DataRow[] foundRows;
foundRows = this.timeattDataSet.Tables["Data"].Select("Token_no= @cToken and Date = @datetime and Time = @cTime");
it gives error for @cToken ,it's say it's column, not a variable
Can you please help
Thanks in advance
Ajith
Member 12931315
10-May-17 11:59am
View
Hi OriginalGriff1
your solution works, thank you very much and also
thanks for the other guys tried to help.
Thing is I am totally new C# and there will be many more
some what stupid problem from me.
Thanks again
Ajith (from Sri Lanka )
Member 12931315
24-Apr-17 13:18pm
View
Hi
Thanks for help,what I did was redesigned combo box and tried and problem got
solved but I found another though while in Visual studio design mode, it shows
as saved and going one record to another and coming data are there.
but when I exit Visual studio and run query from Microsoft sql server tool
for that table those new data is not there.
Have any idea why is that,is Visual studio maintain mirror in working directory
your help much appreciated
Ajith
Member 12931315
24-Apr-17 10:56am
View
Hi
Thanks for quick reply,in my master table bank column length number of characters is 4 so is the support table bank has same number of characters, why I have to go 50 as code value is simply like this '7280', can you elaborate on that.
Thank again for help
Ajith
Show More