15,914,594 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 Chiranthaka Sampath (Top 200 by date)
Chiranthaka Sampath
16-Nov-20 1:54am
View
From your point of view, what am I missing here?
Chiranthaka Sampath
7-Apr-18 5:06am
View
Once I execute the ASP.Net Form, I will type the values into the text boxes and after that I will click on the 'OK' button. At that point I want to pass the values in the text boxes to the JavaScript function. Triggering the JavaScript() function from code behind have achieved with ScriptManager. But still the alert shows the values as null.
JavScript() is in the head tag
Chiranthaka Sampath
5-Jan-18 6:12am
View
I have put this statement in JavaSwingFirstExample(){} and it works fine. Thanks for the quick response.
Chiranthaka Sampath
20-Aug-17 2:41am
View
Hi OriginalGriff,
Thanks for the snippet. You were correct my statement was not affecting the Table. So that I have looked into the SQL statement again & found that the issue is with it. Below is the updated SQL statement.
SqlComm = new SqlCommand("DELETE FROM MyDataTable WHERE DataID LIKE @DataID", SqlConn);
Thanks for your help!
Chiranthaka Sampath
13-Aug-17 12:48pm
View
Problem solved. Many thanks for your help!
Chiranthaka Sampath
13-Aug-17 7:29am
View
I have fixed the UPDATE statement and it has no errors.
SqlComm = new SqlCommand("UPDATE MyDataTable SET DataDesc='@DataDesc', DataDate='@DataDate', DataQty='@DataQty' WHERE DataID='@DataID'", SqlConn);
But when I check the database table the record data hadn't updated. The code is at the below.
private void btnUpdateData_Click(object sender, EventArgs e)
{
try
{
SqlComm = new SqlCommand("UPDATE MyDataTable SET DataDesc='@DataDesc', DataDate='@DataDate', DataQty='@DataQty' WHERE DataID='@DataID'", SqlConn);
SqlComm.Parameters.AddWithValue("@DataID", txtDataID.Text);
SqlComm.Parameters.AddWithValue("@DataDesc", txtDataDesc.Text);
SqlComm.Parameters.AddWithValue("@DataQty", int.Parse(txtDataQty.Text));
SqlComm.Parameters.AddWithValue("@DataDate", dtpDataDate.Value);
SqlComm.ExecuteNonQuery();
//sqlComm.CommandText = @"UPDATE tableName SET paramColumn='@paramName' WHERE conditionColumn='@conditionName'";
MessageBox.Show("Data updated!", "DB Connection With App.Config", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
Clear();
DisableButtons();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
Chiranthaka Sampath
13-Aug-17 7:08am
View
I modified the INSERT INTO statement and used it for the UPDATE command. Below is the INSERT INTO command. Data insertion is nicely done.
try
{
SqlComm = new SqlCommand("INSERT INTO MyDataTable (DataID, DataDesc, DataDate, DataQty) VALUES (@DataID, @DataDesc, @DataDate, @DataQty)", SqlConn);
SqlComm.Parameters.AddWithValue("@DataID", txtDataID.Text);
SqlComm.Parameters.AddWithValue("@DataDesc", txtDataDesc.Text);
SqlComm.Parameters.AddWithValue("@DataQty", int.Parse(txtDataQty.Text));
SqlComm.Parameters.AddWithValue("@DataDate", dtpDataDate.Value);
SqlComm.ExecuteNonQuery();
MessageBox.Show("Data inserted!", "DB Connection With App.Config", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
Clear();
btnAddData.Enabled = false;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Chiranthaka Sampath
13-Aug-17 6:59am
View
Not solved the error is still showing.
Chiranthaka Sampath
5-Nov-16 6:00am
View
Hi Rashid,
Thanks for the tip but I have already declared mysqli_select_db() function. Please refer the 'InsertData.php'
Chiranthaka Sampath
13-Oct-16 2:53am
View
For now no but will use a set of if statements.
Chiranthaka Sampath
7-Sep-16 1:02am
View
Could you propose a database structure for this?
Chiranthaka Sampath
5-Jan-15 0:36am
View
Sorry for the delayed response. I did not want to ruin your holiday. Actually this thing is for my research because we usually Normalize RDBMS databases. So we cannot use redundant data. So how we suppose to insert several data parts grouped into one invoice no? I have an Access Database and planning to use MS SQL or MySQL.
Chiranthaka Sampath
30-Dec-14 21:57pm
View
Hi Bill,
Sorry for the delayed response. I did not want to ruin your holiday. Actually this thing is for my research because we usually Normalize RDBMS databases. So we cannot use redundant data. So how we suppose to insert several data parts grouped into one invoice no? I have an Access Database and planning to use MS SQL or MySQL.
Chiranthaka Sampath
30-Dec-14 1:44am
View
Deleted
Hi Bill,
Sorry for the delayed response. I did not want to ruin your holiday. Actually this thing is for my research because we usually Normalize RDBMS databases. So we cannot use redundant data. So how we suppose to insert several data parts grouped into one invoice no? I have an Access Database and planning to use MS SQL or MySQL.
Chiranthaka Sampath
20-Dec-14 10:22am
View
Hi Bill,
Lets assume that a person come to the grocery and buys some groceries and the cashier add all the purchased groceries into one bill. This data should pas to a Database but how can I organize the tables to sore these info and show them in the UI? That's where I stuck.
Chiranthaka Sampath
17-Oct-14 7:12am
View
Ok then I will look at it again. Anyway thanks pal.
Chiranthaka Sampath
17-Oct-14 6:40am
View
After I stringify the JSON I sow that there are some unwanted XML statements generating. So it generates no of problems. Because of that I want to remove that XML and get the JSON response without that. So that is what I really want to know.
Chiranthaka Sampath
7-Oct-14 6:35am
View
The CSS loading
Chiranthaka Sampath
23-Sep-14 7:21am
View
You are correct. To get the output from setJsonSer() what should I do?. what are you suggesting me pal?
Chiranthaka Sampath
23-Sep-14 6:43am
View
I have posted my complete JavaScript code block in the update. So looking at that I think the solution that you have given is not the one needed. So could you check whether how the solution is to be used within that please!
Chiranthaka Sampath
23-Sep-14 5:23am
View
I've updated the question with the code block that was in the previous comment. In that you can find the rowData. I think rowData is an array. So can you show me how to do the rest please? Because I'm confused with this AJAX and JSON.
Chiranthaka Sampath
23-Sep-14 4:03am
View
But my dear friend that roWData variable is residing in a separate JavaScript function(). So how am I supposed to pass that particular JSON output to that variable. Usually in JS Functions return statement can be used to return the value so it can be grabbed from outside. The same returning value thing is need to be done within this setJsonSer() function. So that is where I'm stucj with. So could you please kindly give me a clue about that? Thanks.
Chiranthaka Sampath
23-Sep-14 2:23am
View
Are there any comments on my question?
Chiranthaka Sampath
22-Sep-14 11:42am
View
Deleted
Look at the following code snippet. In there rowData variable is used to set the JSON response. But that response is static. What I wanted to do is get 2 dates from a HTML form and pass them to to an Analytics Query and according to that query build the JSON response and pass that response to rowData variable.
function Load(){
//-----------------------------------------------
setJsonSer();
var labels = new Array();
var values = new Array();
var catogories = new Array();
var arrayOfArray = new Array();
//alert('func');
var rowData = /*return (JSON.stringify(data));*/
'{"kind":"analytics#gaData","id":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:76546294&dimensions=ga:date&metrics=ga:uniquePageviews,ga:bounces&start-date=2014-01-01&end-date=2014-04-25","query":{"start-date":"2014-01-01","end-date":"2014-04-25","ids":"ga:76546294","dimensions":"ga:date","metrics":["Unique Page views","Bounces"],"start-index":1,"max-results":1000},"itemsPerPage":1000,"totalResults":115,"selfLink":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:76546294&dimensions=ga:date&metrics=ga:uniquePageviews,ga:bounces&start-date=2014-01-01&end-date=2014-04-25","profileInfo":{"profileId":"76546294","accountId":"289147","webPropertyId":"UA-289147-1","internalWebPropertyId":"456104","profileName":"US - Institutional Investors - NP Microsite","tableId":"ga:76546294"},"containsSampledData":false,"columnHeaders":[{"name":"ga:date","columnType":"DIMENSION","dataType":"STRING"},{"name":"ga:uniquePageviews","columnType":"METRIC","dataType":"INTEGER"},{"name":"ga:bounces","columnType":"METRIC","dataType":"INTEGER"}],"totalsForAllResults":{"ga:uniquePageviews":"2663","ga:bounces":"1048"},"rows":[["20140101","75","60"],["20140102","173","108"],["20140103","98","76"],["20140104","1","1"],["20140105","4","2"],["20140106","14","8"],["20140107","11","7"],["20140108","23","10"],["20140109","21","5"],["20140110","45","4"],["20140111","24","0"],["20140112","5","2"],["20140113","33","4"],["20140114","41","7"],["20140115","25","9"],["20140116","16","7"],["20140117","19","8"],["20140118","9","5"],["20140119","7","2"],["20140120","5","5"],["20140121","25","6"],["20140122","15","11"],["20140123","42","3"],["20140124","2","2"],["20140125","2","1"],["20140126","4","1"],["20140127","23","6"],["20140128","16","3"],["20140129","39","8"],["20140130","9","6"],["20140131","18","7"],["20140201","6","6"],["20140202","5","3"],["20140203","31","15"],["20140204","21","7"],["20140205","43","6"],["20140206","19","6"],["20140207","25","7"],["20140208","4","2"],["20140209","5","2"],["20140210","21","9"],["20140211","20","8"],["20140212","18","11"],["20140213","17","7"],["20140214","5","4"],["20140215","3","2"],["20140216","6","2"],["20140217","8","5"],["20140218","35","10"],["20140219","20","13"],["20140220","14","9"],["20140221","19","6"],["20140222","20","4"],["20140223","6","3"],["20140224","20","10"],["20140225","53","9"],["20140226","20","9"],["20140227","42","12"],["20140228","34","8"],["20140301","5","4"],["20140302","11","7"],["20140303","16","9"],["20140304","20","5"],["20140305","25","7"],["20140306","26","11"],["20140307","38","10"],["20140308","10","3"],["20140309","10","5"],["20140310","21","7"],["20140311","17","9"],["20140312","17","6"],["20140313","46","10"],["20140314","33","6"],["20140315","13","4"],["20140316","27","9"],["20140317","19","10"],["20140318","38","15"],["20140319","19","7"],["20140320","22","11"],["20140321","34","17"],["20140322","2","1"],["20140323","12","3"],["20140324","42","8"],["20140325","30","7"],["20140326","21","8"],["20140327","64","36"],["20140328","24","5"],["20140329","25","1"],["20140330","16","2"],["20140331","55","4"],["20140401","37","12"],["20140402","42","17"],["20140403","37","23"],["20140404","40","13"],["20140405","15","3"],["20140406","12","8"],["20140407","23","11"],["20140408","20","11"],["20140409","18","9"],["20140410","2
Chiranthaka Sampath
22-Sep-14 0:35am
View
I want to do this in my office and in there they do not me to have Virtual PCs. However I got the answer but not I expected way. I just wanted to know if there are those kind of Virtual Servers Online and how to use them. That's all. Thanks.
Chiranthaka Sampath
20-Sep-14 9:28am
View
I didn't get that comment pal!
Chiranthaka Sampath
22-Jul-14 22:47pm
View
Ok pal thanx!
Chiranthaka Sampath
22-Jul-14 2:50am
View
Ok it worked fine.
Chiranthaka Sampath
22-Jul-14 1:52am
View
OK I will Thanx for the advice pal.
Chiranthaka Sampath
21-Jul-14 23:21pm
View
Can you post a sample source code? If can please.
Chiranthaka Sampath
21-Jul-14 23:18pm
View
Ok pal this works like a charm. Thanks a lot!
Chiranthaka Sampath
18-Jul-14 6:55am
View
Does someone knows how to this using AJAX?
Chiranthaka Sampath
18-Jul-14 0:45am
View
Ok I found the solution & it's below.
The HTML Page With The Form
<pre lang="HTML">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>First Page</title>
<script type="text/javascript" src="Externaljs.js"></script>
<body>
<!-- Insert your content here -->
<form method="post" action="">
Text One: <input type="text" id="textone" />
<input type="submit" value="Submit" önclick="getVar();return false" />
</form>
</body>
</html>
</pre>
The External JavaScript File
<pre lang="Javascript">
function getVar(){
var strTextOne = document.getElementById("textone").value;
alert(strTextOne)
}
</pre>
Chiranthaka Sampath
17-Jul-14 22:55pm
View
If I use this code snippet in an external JavaScript file, how can I pass the form textboxes' data to the startdate & enddate variables?
Chiranthaka Sampath
17-Jul-14 22:33pm
View
The only problem I was facing the values from the form to the JS file is not passing. Now however your code is working at the 'Fiddle' but not in the real scenario. How it can be?
Chiranthaka Sampath
17-Jul-14 13:53pm
View
This is my HTML Page with the form.
FirstPage.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript" src="ExternalJS.js"></script>
<title>First Page</title>
</head>
<body>
<!-- Insert your content here -->
<form name="textform" action="" method="get">
Text One: <input type="text" id="textone" name="textone" />
<input type="submit" value="Submit" önClick=getVar();false />
</form>
</body>
</html>
This is the external JavaScript File.
//var strTextOne = document.getElementById("textone").value;
var strTextOne = document.textform.textone.value;
function getVar(){
alert(strTextOne);
}
I want to pass the data entered to the HTML textbox to the JavaScript Function() in the external JavaScript File. Now I think you can understand what you need.
Chiranthaka Sampath
17-Jul-14 13:18pm
View
If I enter the data to the form then show be how to pass them to the external JS files' variables.
Chiranthaka Sampath
17-Jul-14 11:54am
View
By referencing the JS file in the HTML file does it acts by directionally?
Chiranthaka Sampath
17-Jul-14 7:01am
View
Ok pal then my webservice is like this.
googleURL= 'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions=ga%3Asource&metrics=ga%3Ausers&filters=ga%3Asource!%3D(direct)&sort=-ga%3Ausers&start-date=' + strStartDate + '&end-date=' + strEndDate + '&max-results=10';
Then how am I suppossed to fill the dates for 'start-date' & 'to-date'. This webservice URL is declared as a variable in a different JavaScript file named Script.js. Can you explain that also please.
Thanks & regards,
Chiranthaka
Chiranthaka Sampath
17-Jul-14 6:32am
View
does this answer make any sence?
Chiranthaka Sampath
16-Jul-14 6:17am
View
The problem is now solved & the answer is residing in the http://www.codeproject.com/Questions/797352/Replacing-Certain-Text-Parts-Using-JavaScript?arn=0 questions last solution. Thank you very much Ashok.
Chiranthaka Sampath
16-Jul-14 6:12am
View
OK pal I use the solution you have provided & it works like a charm. Thank you very much.
Chiranthaka Sampath
16-Jul-14 6:10am
View
Ok pal it worked. The issue actually is a sequencing issue. Thanks for the help.
Chiranthaka Sampath
16-Jul-14 5:53am
View
This is the full source code.
<script type="text/javascript" >
var strStartDate;
var strEndDate;
var googleURL;
//The following JS function will pass the values from the form to the URL.
function passVariable() {
strStartDate = document.getElementById("from_date").value;
strEndDate = document.getElementById("to_date").value;
alert(strStartDate);
alert(strEndDate);
//alert(googleURL);
document.write(googleURL);
}
googleURL = 'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions='+'ga%3Asource&metrics=ga%3Ausers&sort=-ga%3Ausers&start-date=' + strStartDate + '&end-date=' + strEndDate + '&max-results=10';
passVariable();
Chiranthaka Sampath
16-Jul-14 5:52am
View
Deleted
This is my full code.
var strStartDate;
var strEndDate;
var googleURL;
//The following JS function will pass the values from the form to the URL.
function passVariable() {
strStartDate = document.getElementById("from_date").value;
strEndDate = document.getElementById("to_date").value;
alert(strStartDate);
alert(strEndDate);
//alert(googleURL);
document.write(googleURL);
}
googleURL = 'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions='+'ga%3Asource&metrics=ga%3Ausers&sort=-ga%3Ausers&start-date=strStartDate&end-date=strEndDate&max-results=10';
passVariable();
Chiranthaka Sampath
16-Jul-14 5:47am
View
Now its saying undefined for the values. I cannot understand what the problem is. The result is at the below.
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions=ga%3Asource&metrics=ga%3Ausers&sort=-ga%3Ausers&start-date=undefined&end-date=undefined&max-results=10
Chiranthaka Sampath
16-Jul-14 3:41am
View
I did that and still the variables are not assigned to the URL. when I alert the googleURL variable the start-date & end-date are displayed as 'undefined' see it below.
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions=ga%3Asource&metrics=ga%3Ausers&sort=-ga%3Ausers&start-date=undefined&end-date=undefined&max-results=10
So what do you think that what I have to do?
Thanks & regards,
Chiranthaka
Chiranthaka Sampath
16-Jul-14 3:07am
View
Ok now the problem is solved. But the dates are not passing to the URL as it should be. The strStartDate & strEndDate at the googleURL variable hasn't been replaced with the var strStartDate & var strEndDate values. So what do you think about that?
Chiranthaka Sampath
16-Jul-14 2:51am
View
Ok now the problem is solved. But the dates are not passing to the URL as it should be. The strStartDate & strEndDate at the googleURL variable hasn't been replaced with the var strStartDate & var strEndDate values. So what do you think about that?
Chiranthaka Sampath
16-Jul-14 2:20am
View
Both these code snippets are not working. I cannot understand why & also I have the same thing as at the below. But it given me the same result. What is the problem with this?
var googleURL = 'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&dimensions='+'ga%3Asource&metrics=ga%3Ausers&sort=-ga%3Ausers&start-date='+StartDate+'&end-date='+EndDate+'&max-results=10';
var strStartDate;
var strEndDate;
//This is the function that alert the GoogleURL.
function testVal(){
alert(googleURL);
}
//The following JS function will pass the values from the form to the URL.
function passVariable() {
strStartDate = document.getElementById("from_date").value;
strEndDate = document.getElementById("to_date").value;
alert(strStartDate);
alert(strEndDate);
testVal();
}
Chiranthaka Sampath
16-Jul-14 0:54am
View
No pal it doesn't work that way. So what else I have to do?
Chiranthaka Sampath
15-Jul-14 3:15am
View
Ok all my problems were cleared by you. Thanks for the help.
Thanks,
Chiranthaka
Chiranthaka Sampath
15-Jul-14 2:48am
View
Ok its working fine. Now I want to display it just below the form. How am I suppossed to do that?
Chiranthaka Sampath
14-Jul-14 7:09am
View
Your help is appriciated pal, but this is not I wanted. Because I already done the passing as 'Peter Leow' saying in his solution. Now what I want is get the particular values from the URL i.e. startDate & endDate & pass them into 2 JavaScript Variables. Then how am I supossed to do that?
Chiranthaka Sampath
14-Jul-14 6:32am
View
Now the 2 values firstDate & secondDate are in the pages' URL as 'SecondPage.html?firstDate=01%2F01%2F2016&secondDate=05%2F05%2F2016'. Now I want to add the firstDate & secondDate values into two separate variables in the SecondPage.html. These variables are JavaScript variables. Then pal how can I do that?
Chiranthaka Sampath
11-Jul-14 1:41am
View
Now I want to store these 2 values into 2 JavaScript variable called sDate and eDate. Then how I should do that? I've managed to edit the statement at the second page as at the below.
var queryString = decodeURIComponent(window.location.search);
document.write(queryString);
But it gave me an output as at the below.
?firstDate=Today+is&secondDate=11/07/2014
Now I want to pass that 2 values to sDate & eDate. So what should I change in the SecondPage.html page?
Chiranthaka Sampath
11-Jul-14 0:13am
View
Now I want to store these 2 values into 2 JavaScript variable called sDate and eDate. Then how I should do that? I've managed to edit the statement at the second page as at the below.
var queryString = decodeURIComponent(window.location.search);
document.write(queryString);
But it gave me an output as at the below.
?firstDate=Today+is&secondDate=11/07/2014
Now I want to pass that 2 values to sDate & eDate. So what should I change in the SecondPage.html page?
Chiranthaka Sampath
10-Jul-14 6:55am
View
It worked pal & I modified the source code as at the below to get values from a form but the data didn't pass as expected. Instead of that only the form was resetted. The source code is at the below. So could you look at that again?
<body>
<script>
function passing(){
var firstDate=document.getElementsByName("firstDate");
var secondDate=document.getElementsByName("secondDate");
var queryString = "?para1=" + firstDate + "¶2=" + secondDate;
window.location.href = "SecondPage.html" + queryString;
}
</script>
<form önsubmit="passing()" >
<input type="text" id="firstDate" name="firstDate" /><br />
<input type="text" id="secondDate" name="secondDate" /><br />
<input type="submit" value="submit" />
</form>
</body>
Thanks.
Chiranthaka Sampath
10-Jul-14 4:47am
View
If I click the 'LINK' the values will be passed, is it so?
Chiranthaka Sampath
10-Jul-14 2:09am
View
Deleted
The textboxes that has the start-day & end-date values are in a separate HTML file and the above mentioned URL variable in another HTML file. So how am I going to pass data between those 2 HTML pages?
Chiranthaka Sampath
9-Jul-14 3:07am
View
Other than that is there a way, a .Net way to do that? Like calling a form in another project or something like that?
Chiranthaka Sampath
8-Jul-14 7:21am
View
I'm using Internet Explorer 8.0. Will I able to debug the script using it?
Chiranthaka Sampath
8-Jul-14 7:10am
View
Yep I have it with my html page within the same folder.
Chiranthaka Sampath
8-Jul-14 7:06am
View
Pal, I tried both the solutions but the error is still existing. So how am I going to solve the matter?
Chiranthaka Sampath
8-Jul-14 6:58am
View
I have edited the source code as at the below by adding the reference to the JQuery.js file but cannot find what I have done wrong? Could you look at this matter again?
<script src="jquery.js"></script>
Chiranthaka Sampath
8-Jul-14 6:24am
View
I have removed that minified scripts but still the problem is existing.
Chiranthaka Sampath
8-Jul-14 6:17am
View
I have removed that minified scripts but still the problem is existing.
Chiranthaka Sampath
4-Jul-14 12:27pm
View
Pal I think the solution has provided is not relevant to the question that I have raised?
Chiranthaka Sampath
21-Dec-13 1:41am
View
Hello I have asked a question pal! Please try to reply after the Christmas. Because I don't like to destroy your joy in this pleasant season.
Chiranthaka Sampath
9-Dec-13 22:50pm
View
I haven't found a scanner documentation pal.
Chiranthaka Sampath
9-Dec-13 2:44am
View
Why aren't anyone helping me? I am fed of this error. Could you someone solve this matter? Please.
Chiranthaka Sampath
4-Dec-13 23:33pm
View
Could you please see the below comment and could you give me a solution for my errors?
Thanks
Chiranthaka
Chiranthaka Sampath
21-Nov-13 1:30am
View
I have the error in the following statement & the statement is used to pass a selected item as a scanner to a device.
var device = disScanners.SelectedItem as Scanner;
The error is saying that " Cannot convert type 'System.Web.UI.WebControls.ListItem' to 'SPCreateFolder.Scanner' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion. "
Then how am I supposed to solve this error. Because the previous comment you have given is working but how it will allow the scanned to be selected. For more information please refer the source code I have provided.
Chiranthaka Sampath
13-Aug-13 22:52pm
View
I have updated the question. Please refer that !
Chiranthaka Sampath
31-Jul-13 0:34am
View
Pal all I need an filtering algorithm I can't figure it out!
Chiranthaka Sampath
30-Jul-13 23:55pm
View
I know about that pal but this is the matter how I am able to set these filters? I mean the solution to the above mentioned using the filters?
Chiranthaka Sampath
8-Jul-13 7:11am
View
I am wondering that I can find there that using Java Beans for the development. I cannot understand that how to amend Java Beans with
JPA.
Chiranthaka Sampath
8-Jul-13 6:10am
View
I had tried this as at the below. But it doesn't work properly.
-----------------------------------------------------------------------------------------
Employee emp = new Employee();
String id = new String();
id = txtStudNo.getText();
DBM.getEmployeeJpaController().findEmployee(id);
txtStudName.setText(emp.getEmpName());
txtAddress.setText(emp.getEmpAddress());
-----------------------------------------------------------
Please could you explain what the problem is?
Chiranthaka Sampath
8-Jul-13 2:18am
View
Ok sir I solved my problem using the solution you have provided. Thanx anyway. I have bookmarked the tutorial from Lars Vogal and I appreciate your opinion really.
Chiranthaka Sampath
5-Jul-13 10:21am
View
Then what should I do sir ? Because I tried that and couldn't get the results to the 2nd JPanel() Then what should I do? Please give me some help.
Chiranthaka Sampath
4-Jul-13 20:26pm
View
I have solved my problem and I posted it as an answer. If there are other ways to do this please enlighten me. But thank you
for the advices you have given. I really appreciate it.
Chiranthaka Sampath
4-Jul-13 11:27am
View
I have tried that as the below.
public void repaint() {
super.repaint(); //To change body of generated methods, choose Tools | Templates.
}
public void load(){
Student oStudent = new Student();
txtStudId.setText(oStudent.getStrStudName());
txtStudId.setText(oStudent.getStrStudNo());
txtTotal.setText(Double.toString(oStudent.calTotal()));
txtAverage.setText(Double.toString(oStudent.calAverage()));
txtGrade.setText(oStudent.findGrade());
repaint();
}
The result is the same and the 2nd UI didn't grab the data.
I also tried the following
JComponent.repaint( );
It didn't worked either.
I can't find any solution for that. Please try to give me more help. Thanks.
Chiranthaka Sampath
4-Jul-13 4:07am
View
All I want is when the 2nd JPanel form i.e. DisplayDetails opens the data in the Student class to be inserted to the TextFields of the DisplayDetails form. I am stuck at that point. If you please give me some clue about that. Because Ypu have mentioned about the JPanel's update ( ) but I couldn't find that. I don't think that is an inbuilt one. Thank You!
Chiranthaka Sampath
4-Jul-13 3:41am
View
I can't find any Update ( ) method regarding the JPanel form.
Chiranthaka Sampath
4-Jul-13 3:05am
View
Deleted
Is the JPanels update ( ) is a built in method pal ? Then I think that's the answer for my problem.
Chiranthaka Sampath
4-Jul-13 2:33am
View
Ok I have deleted all unnecessary main ( ) from the 2 JPanel classes to avoid confusions over accessing the classes. But now my problem is when I enter values from the 1st JPanel form I want the calculation done at the Student { } class and retrieve that data from the 2nd JPanel form. When the Calculate button on the JPanel Form 1 clicked the 2nd Jpanel forms loaded perfectly. But the data I have passed from the student class to the 2nd JPanel does not display. My source code for the second JPanel form is in the Updated question.
Chiranthaka Sampath
3-Jul-13 7:34am
View
Ok sir I have deleted the main() from the JPanel Forms. Then I have executed the 1st class and it was a sucess. But as the previous attempts the results from the 1st class i.e. calTotal(),calAverage() and the findGrade() will return any answers but the 2nd GUIs doesn't seem to grab that results from the 1st class i.e. the variables and the other calculations are reside. I can't find the problem please help me.
Chiranthaka Sampath
3-Jul-13 7:18am
View
My GUIs are in separate classes and the variables are in a separate class. I cannot understand what you are telling me sir!
Chiranthaka Sampath
3-Jul-13 6:01am
View
Ok pal then what does MyData class do? Is it similar to the "public class JPanelOnJFrameMulti{}" in my program that stores values?
Chiranthaka Sampath
30-Jun-13 10:58am
View
I have one question when I click a button i.e. No 1 then the value will be assign to the textfield. Then I want to add no 3 like 13 then the first entered deleted the second value will be entered to the textfield. Then how am I able to put numbers as many as possible ?
Chiranthaka Sampath
30-Jun-13 10:44am
View
Ok then could you tell me if you want to make a calculator then what will you use in java?
Chiranthaka Sampath
30-Jun-13 10:44am
View
Deleted
Ok then could you tell me if you want to make a calculator then what will you use in java?
Chiranthaka Sampath
30-Jun-13 10:35am
View
Then what kind of steps then I should follow pal ?
Chiranthaka Sampath
30-Jun-13 9:52am
View
Then how am I able to cast the TextField value to an Integer? Because you have shown me a much simpler way to cast an Integer to String. Then there should be a much simpler way to do the same thing in the other way round.
Chiranthaka Sampath
28-Jun-13 3:48am
View
Casting TextField value to an integer variable can be done as this.
oStudent.setMaths(Integer.parseInt(txtMaths.gettext()));
Casting Integer to a TextField value.
txtTotal.setText(Integer.toString(oStudent.calTotal()));
Chiranthaka Sampath
17-Jun-13 13:34pm
View
I have created an object in the AccessVaria class but that object cannot be use like this
private Basics oBasics = new Basics();
oBasics.intMaths=10;
But when I used that object declared inside the main() it can be easily use.
Then what is the problem ?
Chiranthaka Sampath
17-Jun-13 9:39am
View
Thanks for your comment !
Chiranthaka Sampath
31-May-13 1:29am
View
I think that will me solve the problem. Thanx anyway !!!!!!!!
Chiranthaka Sampath
30-May-13 1:37am
View
See the updated question !
Chiranthaka Sampath
30-May-13 1:37am
View
See the updated question !
Chiranthaka Sampath
27-May-13 0:17am
View
I have done that in SQL Server Express 2008 that comes with VS 2010 and it didn't give the error that previously displayed. Then what is the reason for that pal!
Chiranthaka Sampath
12-May-13 1:59am
View
I need a server side solution rather than JavaScript or JQuery or AJAX because when the browser's JavaScript is disabled the validation is not going to work!
Chiranthaka Sampath
12-May-13 1:56am
View
Deleted
Here is the code
<!----------------
<td class="style1">
<asp:TextBox ID="txtEmpNo" runat="server" CssClass="style3"
Font-Names="Calibri" width="237px" MaxLength="6"
ontextchanged="txtEmpNo_TextChanged">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="RegularExpressionValidator" ControlToValidate="txtEmpNo" ValidationExpression="^([\0-9]{0,6})$">
</td>
--------------->
Chiranthaka Sampath
12-May-13 1:55am
View
This is the code
<!-------------------------
<td class="style1">
<asp:TextBox ID="txtEmpNo" runat="server" CssClass="style3"
Font-Names="Calibri" width="237px" MaxLength="6"
ontextchanged="txtEmpNo_TextChanged">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ErrorMessage="RegularExpressionValidator" ControlToValidate="txtEmpNo" ValidationExpression="^([\0-9]{0,6})$">
</td>
---------------------------->
Chiranthaka Sampath
12-May-13 1:27am
View
Yes the error is stated at the question saying that "Msg 201, Level 16, State 4, Procedure LeaveApply, Line 0
Procedure or function 'LeaveApply' expects parameter '@EmpNo', which was not supplied.
(1 row(s) affected)"
Chiranthaka Sampath
9-May-13 18:08pm
View
Do you think that my SP is correct! If so I am glad because I am a newbie to SQL SPs.
Chiranthaka Sampath
9-May-13 18:07pm
View
Ok thanks for the help anyway!
Chiranthaka Sampath
9-May-13 18:07pm
View
Are there any gentlemen more who like to help me? Because I am bored with this matter !
Chiranthaka Sampath
9-May-13 18:01pm
View
Certainly I am filling all the text boxes!
Chiranthaka Sampath
9-May-13 17:55pm
View
When I execute the SP in VS 2010 Server explorer I got the following error!
"The Stored procedure <[dbo].[LeaveApply] requires the following parameter. At a table The Type(sql datatype), Direction, Name(parameter), Value (DEFAULT) shows! I think not assigning of the values is the problem not the assigning method. Could you kindly correct me!
Chiranthaka Sampath
9-May-13 17:34pm
View
Ok pal then can I use this same technique to insert many parameters ? As an example like the following
dataParameter.Value = txtEmpName.Text.Trim();
dataParameter.ParameterName = "@EmpName";
dataParameter.Value = txtDesignation.Text.Trim();
dataParameter.ParameterName = "@Designation";
dataParameter.Value = txtDept.Text.Trim();
dataParameter.ParameterName = "@Dept";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(dataParameter);
Likewise as could as much !
Chiranthaka Sampath
8-May-13 18:12pm
View
Yes I have use that RegularExpression validator. I add the value for the 'Validation Expression' property with your '^[0-9]{1,7}$' and there is no any property as 'Regular Expression'. How ever it gives me a list of files in my projects' folder instead of validating for numbers! I don't know how to solve this!
Chiranthaka Sampath
8-May-13 17:54pm
View
I only set those 2 properties only pal! What I have done wrong ?
Chiranthaka Sampath
8-May-13 17:45pm
View
I have used that and gave me a run time error! Saying
The value '' of the ValueToCompare property of 'cmvEmpNo' cannot be converted to type 'Integer'.
Then How to do that!
Chiranthaka Sampath
7-May-13 13:55pm
View
Question Updated with the Calendar control HTML!
Chiranthaka Sampath
7-May-13 13:36pm
View
Ok it took sometime to popup and your suggestion works! Do you have any idea to speedup the popping up the calendar?
Chiranthaka Sampath
7-May-13 13:32pm
View
I have done that but the result is the same!
Chiranthaka Sampath
7-May-13 13:16pm
View
Yes I debug it but no answer!
Chiranthaka Sampath
6-May-13 4:01am
View
In here you have develop the code using some sort of new textboxes and buttons but in my case I want to use the Login control of the tools of the VS 2010 and I need the help to add the database to this Login control. Remember that this as ASP.Net form ASP.Net uses the Login control!
Chiranthaka Sampath
6-May-13 3:21am
View
Ok I have visited that and then I want to validate that login control's username and the password from a table that in a SQL database. Then how am I going to do that? Please help me!
Chiranthaka Sampath
5-May-13 20:45pm
View
Ok then what method of that login control to use?
Chiranthaka Sampath
10-Apr-13 7:03am
View
Ok pal you solved my problem thanx any way! I really appreciate your help!
Chiranthaka Sampath
10-Apr-13 6:08am
View
Ok pal then what should I do? Please state the best practice! Thank You!
Chiranthaka Sampath
10-Apr-13 5:23am
View
Ok pal then how can I able to pass the value to a text box in another form?
I have tried that as the following
Form 1
private CommonVariables CV01 = new CommonVariables();
private void button1_Click(object sender, EventArgs e)
{
CV01.StrSuperPatID = strYear + strMonth + strID;
frmHBAIC hbi01 = new frmHBAIC();
hbi01.Show();
}
Form 02
private CommonVariables CV01 = new CommonVariables();
private void button1_Click_1(object sender, EventArgs e)
{
label1.Text = CV01.StrSuperPatID;
}
public class CommonVariables
{
private String strSuperPatID;
public String StrSuperPatID
{
get { return strSuperPatID; }
set { strSuperPatID = value; }
}
}
But when I click the Button at the Form 02 the label does not display the value! Have I done all the things correctly?
Chiranthaka Sampath
7-Apr-13 8:42am
View
Could you show me how to do the solution as mentioned you?
Chiranthaka Sampath
7-Apr-13 8:41am
View
Deleted
Could you show me how to do that?
Chiranthaka Sampath
7-Apr-13 8:41am
View
Deleted
Could you show me how to do the solution as mentioned you?
Chiranthaka Sampath
7-Apr-13 8:38am
View
You have mentioned that "don't expose your backing fields!" does make it any sense that this is about encapsulation? Or other thing? can you explain it to me?
Chiranthaka Sampath
7-Apr-13 7:22am
View
It didn't help me to solve the problem. However I have placed the modified question as the solution 02 and hope it will describe my problem
Chiranthaka Sampath
7-Apr-13 7:21am
View
I know pal but I wanted to place the updated question in with the old question and I will not do that again!
Chiranthaka Sampath
7-Mar-13 17:45pm
View
Deleted
Then how am I able to do this using parametrized values ?
Chiranthaka Sampath
7-Mar-13 17:11pm
View
Deleted
PatID will be generated like this
//Creating the Patient ID.
intYear = DateTime.Now.Month;
strYear = intYear.ToString();
strID = cmbPatID.Text;
strPatID = strYear + strID;
Chiranthaka Sampath
7-Mar-13 17:04pm
View
Deleted
PatID will be generated like this
//Creating the Patient ID.
intYear = DateTime.Now.Month;
strYear = intYear.ToString();
strID = cmbPatID.Text;
strPatID = strYear + strID;
Chiranthaka Sampath
7-Mar-13 1:13am
View
Ok that made my problem solved Thanks for the help!
Chiranthaka Sampath
14-Feb-13 10:34am
View
Isn't there any other option in SQL SERVER 2008 that can track the updated, deleted or inserted record ? Like an option within the SQL server 2008 management studio.?
Chiranthaka Sampath
14-Jan-13 5:56am
View
Ok pal I will take your advice! Thanks anyway!
Chiranthaka Sampath
13-Jan-13 10:12am
View
Ok pal I have paste the modified code for the Find button and I have stated it as the Modified Find button. So could you please tell me what is the problem with the code!
Chiranthaka Sampath
13-Jan-13 10:12am
View
Ok pal I have paste the modified code for the Find button and I have stated it as the Modified Find button. So could you please tell me what is the problem with the code!
Chiranthaka Sampath
13-Jan-13 9:57am
View
Ok pal I have paste the modified code for the find button and stated it as the "Modified find button". Now could you please tell me what I have done wrong! Thank you
Chiranthaka Sampath
13-Jan-13 9:12am
View
I have used that tutorial & tried the following code but getting an error i.e. Parameter index out of range (1 > number of parameters, which is 0).
private void btnFindActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Connection dbConnection = null;
PreparedStatement preparedStatement = null;
String temp = txtSupNo.getText();
String selectSQL;
selectSQL = "Select * from Purchasing WHERE SupNo= '"+temp+"'";
try {
dbConnection = DbConn.ConnDB();
preparedStatement = dbConnection.prepareStatement(selectSQL);
preparedStatement.setInt(1, 1);
// execute select SQL stetement
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
String SupNo = rs.getString("SupNo");
String SupName = rs.getString("SupName");
txtSupNo.setText(SupNo);
txtSupName.setText(SupName);
}
} catch (SQLException e) {
System.out.println(e.getMessage());
} finally {
if (preparedStatement != null) {
try {
preparedStatement.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
if (dbConnection != null) {
try {
dbConnection.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
Chiranthaka Sampath
12-Jan-13 1:51am
View
I tried that tutorial & did the following coding set but it generated an error "Parameter index out of range (1 > number of parameters, which is 0)". I don't know how to fix this matter.
private void btnFindActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Connection dbConnection = null;
PreparedStatement preparedStatement = null;
String temp = txtSupNo.getText();
String selectSQL;
selectSQL = "Select * from Purchasing WHERE SupNo= '"+temp+"'";
try {
dbConnection = DbConn.ConnDB();
preparedStatement = dbConnection.prepareStatement(selectSQL);
preparedStatement.setInt(1, 1);
// execute select SQL stetement
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
String SupNo = rs.getString("SupNo");
String SupName = rs.getString("SupName");
txtSupNo.setText(SupNo);
txtSupName.setText(SupName);
}
} catch (SQLException e) {
System.out.println(e.getMessage());
} finally {
if (preparedStatement != null) {
try {
preparedStatement.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
if (dbConnection != null) {
try {
dbConnection.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
Chiranthaka Sampath
12-Jan-13 1:48am
View
Deleted
I have used that tutorial & tried the following code but getting an error i.e. Parameter index out of range (1 > number of parameters, which is 0). private void btnFindActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: Connection dbConnection = null; PreparedStatement preparedStatement = null; String temp = txtSupNo.getText(); String selectSQL; selectSQL = "Select * from Purchasing WHERE SupNo= '"+temp+"'"; try { dbConnection = DbConn.ConnDB(); preparedStatement = dbConnection.prepareStatement(selectSQL); preparedStatement.setInt(1, 1); // execute select SQL stetement ResultSet rs = preparedStatement.executeQuery(); while (rs.next()) { String SupNo = rs.getString("SupNo"); String SupName = rs.getString("SupName"); txtSupNo.setText(SupNo); txtSupName.setText(SupName); } } catch (SQLException e) { System.out.println(e.getMessage()); } finally { if (preparedStatement != null) { try { preparedStatement.close(); } catch (SQLException ex) { Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex); } } if (dbConnection != null) { try { dbConnection.close(); } catch (SQLException ex) { Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex); } } }
Chiranthaka Sampath
12-Jan-13 1:48am
View
I have used that tutorial & tried the following code but getting an error i.e. Parameter index out of range (1 > number of parameters, which is 0).
private void btnFindActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Connection dbConnection = null;
PreparedStatement preparedStatement = null;
String temp = txtSupNo.getText();
String selectSQL;
selectSQL = "Select * from Purchasing WHERE SupNo= '"+temp+"'";
try {
dbConnection = DbConn.ConnDB();
preparedStatement = dbConnection.prepareStatement(selectSQL);
preparedStatement.setInt(1, 1);
// execute select SQL stetement
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
String SupNo = rs.getString("SupNo");
String SupName = rs.getString("SupName");
txtSupNo.setText(SupNo);
txtSupName.setText(SupName);
}
} catch (SQLException e) {
System.out.println(e.getMessage());
} finally {
if (preparedStatement != null) {
try {
preparedStatement.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
if (dbConnection != null) {
try {
dbConnection.close();
} catch (SQLException ex) {
Logger.getLogger(Purchasing.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
Chiranthaka Sampath
10-Jan-13 21:09pm
View
Ok pal now I have deleted the record successfully but now I want to pass the retrieved fields to the text boxes. At there do I have to use encapsulated fields of the prepared statement, statement & resultset? Then how to use them to pass the rest of the data of the record!
Chiranthaka Sampath
8-Jan-13 20:57pm
View
Ok then I will try that!
Chiranthaka Sampath
8-Jan-13 18:36pm
View
Ok the Code
private void cmdFindActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
sql = "SELECT * FROM ITEMDETAILS WHERE ItemCode = 'txtICode.text'";
try{
ps=conn.prepareStatement(sql);
ps.execute();
txtIName.setText(ItemName);
} catch (Exception e){
}
Error Message
cannot find symbol
symbol: variable ItemName
location: class ItemDetails
Chiranthaka Sampath
8-Jan-13 18:09pm
View
I tried it with my database table's fields but it does not work!!
Chiranthaka Sampath
8-Jan-13 18:07pm
View
This CustomerName is one of the fields in the database table right! But When I tried that it gives me an error 'Cannot find simple'. After executing the PreparedStatement (ps) & the SQL statement how am I able to get those data of the other fields of the database table to the textfields? That's where I have strucked!
Chiranthaka Sampath
8-Jan-13 17:46pm
View
I have read that tutorial pal and I already know about that but my problem is how am I able to get those fields and split them and pass that values to the corresponding textfields. I just need some sample source code only! Not the whole program!
Chiranthaka Sampath
8-Jan-13 17:29pm
View
The how am I able to split them and set them to textfields! That part cannot understandable!
Chiranthaka Sampath
8-Jan-13 16:54pm
View
I have done this to some extend but cannot complete it. The work I have done is as below
private void cmdFindActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
public Connection conn= null;
public ResultSet rs = null;
public PreparedStatement pst =null;
sql = "SELECT * FROM ITEMDETAILS WHERE ItemCode = 'txtICode.text'";
}
After executing the sql command what should I do and how am I able to pass the data to the textfields?
Chiranthaka Sampath
8-Jan-13 16:06pm
View
Then how am I able to get the data from the database & pass it into text fields? Pal
Chiranthaka Sampath
7-Jan-13 9:16am
View
Hello anybody there?????
Chiranthaka Sampath
6-Jan-13 6:10am
View
Ok pal I have posted the total application as the Solution 1 & I have stated what really I want
Thank You
ChiranSJ
Chiranthaka Sampath
6-Jan-13 3:42am
View
When the sql command executed the result should pass to the corresponding text fields that part is the problem!
Chiranthaka Sampath
6-Jan-13 3:23am
View
When the sql command executed the result should pass to the corresponding text fields that part is the problem!
Chiranthaka Sampath
5-Jan-13 9:29am
View
Now I am getting an error "unclosed character literal not a statement unclosed string literal". Could you please solve this also?
Chiranthaka Sampath
25-Dec-12 13:01pm
View
In your Solution 02 you have mentioned that some parts will have to move one layer up to the MainWindow from the Enter_Stud_details jPanel form! What they will be? I am very frustrated about this matter by keep questioning this matter and also I think you feel the same! If you can please post the whole answer and that will be my last request!
Thank You
Chiransj
Chiranthaka Sampath
25-Dec-12 12:10pm
View
I tried that man nothing happened! At the below the coding is resides.
private void jMenu3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.oInvenDet.setVisible(true);
MainWindow.this.repaint();
}
Chiranthaka Sampath
23-Dec-12 15:20pm
View
Sorry my mistake the following statement is declared at the JFrame class MainWindow
private Enter_Stud_Details oEntStuDet = new Enter_Stud_Details();
private void jMenu1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
oEntStuDet.setVisible(true);
}
But when I click the menu the Enter_stud_details JPanel form didn't opened up! So what I have done wrong here? I used all your code set properly! If you have please try to solve my problem!
Chiranthaka Sampath
23-Dec-12 3:23am
View
If I use a menu bar then it should be in the JFrame I think it is the correct way! Then how am I able to open a JPanel using a menu? I already tried the follwoing statement
JPanel Enter_Stud_Details oEnterStud = new Enter_Stud_Details();
oEnterStud.setVisible = true;
But unfortunately the Jpanel did not opend! Then what should I do to open the JPanel? If you have time please try to solve my problem again!
Thank You
Chiransj
Chiranthaka Sampath
23-Dec-12 3:12am
View
Ok pal I will try that! Thanks anyway!
Chiranthaka Sampath
22-Dec-12 1:30am
View
Ok then where should I place the connection-string in this method? And also it gives me an error at dbConn = new dbConnect(); as "Cannot create an instance of abstract class or interface!" If you could please try to solve my problem! Thank you!
Chiranthaka Sampath
21-Dec-12 5:19am
View
Isn't there any other solution to overcome this problem? I am using the MS OFFICE 2010 64 bit edition.!
Chiranthaka Sampath
19-Dec-12 8:45am
View
Thanks pal however I am appreciating your help!
Chiranthaka Sampath
19-Dec-12 8:40am
View
Certainly pal! I will need your help in future. Thanks any way!
Chiranthaka Sampath
19-Dec-12 4:13am
View
When I developing the class VehicleManagement() i got the following error.
no suitable method found for add(List<vehicle>)
method ArrayList.add(int,Vehicle) is not applicable
(actual and formal argument lists differ in length)
method ArrayList.add(Vehicle) is not applicable
(actual argument List<vehicle> cannot be converted to Vehicle by method invocation conversion)
----
Chiranthaka Sampath
19-Dec-12 3:05am
View
When I developing the class VehicleManagement() i got the following error.
no suitable method found for add(List<vehicle>)
method ArrayList.add(int,Vehicle) is not applicable
(actual and formal argument lists differ in length)
method ArrayList.add(Vehicle) is not applicable
(actual argument List<vehicle> cannot be converted to Vehicle by method invocation conversion)
----
Chiranthaka Sampath
18-Dec-12 9:11am
View
So good so far. OK then I want to create a method to display the vans that can be hired! So how am I able to do that? Please try to help me on this matter also as the previous ones!
Thank You
Chiransj
Chiranthaka Sampath
18-Dec-12 6:20am
View
The dbConnect class is used to simply store the OledbConnection, OledbCommand, OledbAdapter as global variables so that I never wanted to declare in every form.
Chiranthaka Sampath
18-Dec-12 6:13am
View
Yes but the member list don't show any members of the dbConnect class!
Chiranthaka Sampath
11-Dec-12 21:23pm
View
Then pal could you read my problem and give me a solution using a method to calculate the total no of vans that can be hired using a method.
Chiranthaka Sampath
11-Dec-12 21:22pm
View
Thanks for your advice for the design patterns but pal my requirement is to calculate the total no of vans that can be hired using a method! Please try to understand my situation.
Chiranthaka Sampath
29-Nov-12 12:05pm
View
Ok pal I will explain what I need to know!
1. A customer comes to the shop and he/she buys some shoes from the shop.
2. That information will be stored according to the following data.
ID - Autonumber PRIMARY KEY - This will be allocated to each purchase
Date - Purchasing Date
Time - Purchasing Time - Both the time and the date are getting from the system date & time.
Item Description - The description of the item
QTY - Quantity
Price
Value - QTY * Price
Now I want to add these data in a report like in an invoice. This is doing in a POS system but I don't know how to print the receipt!
Chiranthaka Sampath
20-Nov-12 5:52am
View
OK then I have solved my problem with your kind help and now I want to display the results of the 2 methods in a different user interface(jFrame form) and how am I able to do that?
Chiranthaka Sampath
24-Oct-12 2:17am
View
Ok I have created the methods or the functions as the below at the StudVariables.java class. Would you kind to confirm that these are correct or not?
public void setTotal(double Total) {
Total = Maths + Science + English;
this.Total = Total;
}
public void setAverage(double Average) {
Average = Total/3;
this.Average = Average;
}
Chiranthaka Sampath
23-Oct-12 4:58am
View
Can I use the set( ) or get () methods to do that?
Chiranthaka Sampath
22-Oct-12 11:39am
View
Ok then where should I put that function? In StudVariables.java or in the EnterStudDetails.java (the user interface)?
Chiranthaka Sampath
18-Oct-12 2:16am
View
I really want a help about this pal!
Chiranthaka Sampath
16-Oct-12 22:11pm
View
Ok then I want to calculate the total of the 3 subjects(maths, science, english). They have being stated at the 01. studVariable.java class file. I am accessing those variable from the 02. enter_stud_details.java class using reference variables and I will calculate the total using the public double total( ){ //the calculating statement. } method or the function. but my problem is how can I use these reference variables to calculate the total within this function? I don't think that I am annoying you! Sorry!
Chiranthaka Sampath
16-Oct-12 2:37am
View
Ok pal then assume that I am creating a function or method called
"public double Total(){
//The calculating statement
};"
What should be the calculating statement? I think I am not joking with you but I realy apologize if I made you upset! Sorry
Chiranthaka Sampath
15-Oct-12 5:10am
View
Ok then which book I should buy? I have no idea what to select!
Chiranthaka Sampath
15-Oct-12 3:54am
View
I am using the encapsulation so how can I able to assign the values using the GUI in the Enter_Stud_Details.java to the private variable in the StudVariables.java. Also if you can please send me a link to an application source code location that I can find some good examples like this. Thanx for all your comments and helps.
Chiranthaka Sampath
14-Oct-12 10:11am
View
I saw the edit & I want more. That will be stated at the below
When I coding the program I wanted to get data from the jTextField3.text(). But it requires to convert to the Double data type from the String data type. The coding will be as the following. oStudent.setMaths(jTextField3.getText());
After that I want the following also
Now how can I do the calculations?
Chiranthaka Sampath
14-Oct-12 5:41am
View
Now how can I do the calculations? Please try to help me!
Chiranthaka Sampath
14-Oct-12 4:05am
View
When I coding the program I wanted to get data from the jTextField3.text(). But it requires to convert to the Double data type from the String data type.
The coding will be as the following.
oStudent.setMaths(jTextField3.getText());
Chiranthaka Sampath
11-Oct-12 9:03am
View
Ok pal I will try that code!
Chiranthaka Sampath
11-Oct-12 7:06am
View
I have a small doubt! How can I possibly do assign values to the variables in StudVariables class using the GUI in the Enter_Stud_Details class? I am new to java so give me some good advice for this. Thanks
Chiranthaka Sampath
11-Oct-12 0:12am
View
I have used getters( ) and setters( ) to access those variables. That is why it is called as Encapsulation.
Chiranthaka Sampath
10-Oct-12 11:38am
View
I want that to prevent the variables are being accessed by the UI directly!
Chiranthaka Sampath
3-Oct-12 18:56pm
View
Thanx bro
Chiranthaka Sampath
3-Oct-12 18:56pm
View
Ok thanks Pal!
Chiranthaka Sampath
2-Oct-12 11:05am
View
I need VB 2005 or VB 2008 example not C#! But your help is valuable
Chiranthaka Sampath
2-Oct-12 11:04am
View
But my dear brother all these are are Java not VB. Please help me to do this in VB 2005 or VB 2008
Chiranthaka Sampath
23-Sep-12 6:31am
View
Ok dude I owe you! The problem was solved many thanx!
Chiranthaka Sampath
23-Sep-12 5:38am
View
I have change the source code as at the below but gives the same result
<pre>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>PHP With JavasCript</title>
</head>
<body>
10){
echo <script language = "JavaScript" type="text/javascript">;
document.write("OK!");
</script>;
}
?>
</body>
</html>
</pre
Chiranthaka Sampath
17-Sep-12 2:03am
View
Ok guys ultimately I found all the solutions for my problems & thanks for the help! By the way the error was to when not enable to edit the year and the month was that I had typed <pre>changeyear , & changemonth , </pre> <pre>instead of chnageYear , & changeMonth,</pre>
Chiranthaka Sampath
17-Sep-12 1:23am
View
I have use all the code provided by the ShotDriller but gives the same result!
Chiranthaka Sampath
14-Sep-12 10:41am
View
Ok I got some sort of solution but my point is if I am using jqueryui.com's datepicker how would I able to change the year and the month
Chiranthaka Sampath
14-Sep-12 3:22am
View
But pal I cannot change the month or year?
Show More