|
|
Hello,
I have developed a website in n-tier architecture model. IT is working fine in local. But the problem is it is not working fine on server. I have uploaded website(files and folders including Bin). Transport,Data,Business layers dll's are in Bin folder.
The Problem is While retrieving the values from database into dataset error occurs.
Please Let me know how to upload N-tier arch model website and what files have to upload.
Thanks in advance
|
|
|
|
|
|
Thanks for the answer. But I have developed website not windows application.
Am getting Security Exception. i.e
System.Security.SecurityException: That assembly does not allow partially trusted callers.
Thanks in Advance
|
|
|
|
|
|
The Implementation is the same , for the Error that you are getting take Abhishek Sur advice and following the link
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Here iam creating dynamic data with 2 tables
the desired Output should be like this
<a href="http://www.freeimagehosting.net/uploads/3ae42a5662.jpg"> click here to see</a>
but im getting this
<a href ="http://www.freeimagehosting.net/uploads/6835576eac.jpg" > Click Here to see </a>
Please help me
DataSet ds;
DataTable t1, t2, t3;
DataRow r;
DataColumn c1, c2, c3, c4, c5, c6;
ds = new DataSet();
t1 = new DataTable("emp");
t2 = new DataTable("dep");
c1 = new DataColumn("Eid");
c2 = new DataColumn("Ename");
c3 = new DataColumn("DID");
t1.Columns.Add(c1);
t1.Columns.Add(c2);
t1.Columns.Add(c3);
c4 = new DataColumn("DID");
c5 = new DataColumn("Dname");
c6 = new DataColumn("Daddress");
t2.Columns.Add(c4);
t2.Columns.Add(c5);
t2.Columns.Add(c6);
for (int i = 0; i < 3; i++)
{
r = t1.NewRow();
r[0] = 10 + i;
r[1] = "charle" + i;
r[2] = 100 + i;
t1.Rows.Add(r);
}
for (int i = 0; i < 3; i++)
{
r = t2.NewRow();
r[0] = 100 + i;
r[1] = "IT DEP no " + i;
r[2] = "AMPT";
t2.Rows.Add(r);
}
dataGridView1.DataSource = t1.DefaultView;
dataGridView2.DataSource = t2.DefaultView;
t1.Merge(t2);
dataGridView3.DataSource = t1.DefaultView;
please help me Friends
|
|
|
|
|
|
Hello All
I've a grid with multiple columns ,one of them is a boolean column,i want to represent it as a chackbox ,
when the checkbox checked or unckecked i want the database to change automatically ,
i get this error before the page even loaded ,here is the Source Error:
-------------------------------------------------------------------
Line 38: <cc1:gridtemplate runat="server" id="tplSent">
Line 39: <template>
Line 42:
------------------------------------------------------------------------
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
C:\CRFF\Default.aspx.vb(79) : warning BC42104: Variable 'wks' is used before it has been assigned a value. A null reference exception could result at runtime.
If Not (wks Is Nothing) Then
~~~
C:\CRFF\Default2.aspx(49) : warning BC42020: Variable declaration without an 'As' clause; type of Object assumed.
Dim s = r("employeeid").ToString
~
C:\CRFF\IT_Daily_Tasks.aspx(40) : error BC30201: Expression expected.
target.SetDataBoundString(1, System.Convert.ToString(Container.Value == "True" ? "checked='checked'" : "", System.Globalization.CultureInfo.CurrentCulture))
~
C:\CRFF\IT_Daily_Tasks.aspx(40) : error BC30035: Syntax error.
target.SetDataBoundString(1, System.Convert.ToString(Container.Value == "True" ? "checked='checked'" : "", System.Globalization.CultureInfo.CurrentCulture))
----------------------------------------------------------------------------
Help Please
modified on Wednesday, December 2, 2009 12:10 AM
|
|
|
|
|
I understand that your code behind is VB.NET [C:\CRFF\Default.aspx.vb].
As far as I know there is no ternary operator i.e. [expr?expr:expr], available in VB.
|
|
|
|
|
Actually i do have VB.net code behind ,but for the purpose of instant DB
updating i've used JAVASCRIPT the sript is below, hope that would clarify
function updateSent(bSent, iRowIndex) {
var oRecord = new Object();
oRecord.OrderID = grid1.Rows[iRowIndex].Cells[0].Value;
oRecord.ShipName = grid1.Rows[iRowIndex].Cells[1].Value;
oRecord.ShipCity = grid1.Rows[iRowIndex].Cells[2].Value;
oRecord.ShipPostalCode = grid1.Rows[iRowIndex].Cells[3].Value;
oRecord.ShipCountry = grid1.Rows[iRowIndex].Cells[4].Value;
oRecord.Sent = bSent;
grid1.executeUpdate(oRecord);
}
|
|
|
|
|
Based on your question I understood that we are talking about a compilation error and my comment was about the checkbox definition statement
<input type="checkbox" önclick="updateSent(this.checked, <%# Container.PageRecordIndex %>)" <%# Container.Value == "True" ? "checked='checked'" : "" %> />
You are using a server evaluation to set the checked status using the ternary operator in the below line.
<%# Container.Value == "True" ? "checked='checked'" : "" %>
I guess this is where the error is, using ternary operator in a server evaluation where the code behind is VB.NET
|
|
|
|
|
I guess you are right ,cuz when i removed the[evaluation] the page loaded succesfuly , now do i have to give up the whole idea of changing the DB instantly via some JavaScript code?
|
|
|
|
|
Did you try using the IFF function to evaluate the checked status?
|
|
|
|
|
i tried but i got:
BC30451: Name 'IFF' is not declared.
i tried : Checked="<%# IF((Container.Value = "True"), true, false)%>" />
i got the old error : BC30201: Expression expected.
|
|
|
|
|
Try the following:
<asp:CheckBox ID="chkBox" runat="server" önclick="updateSent(this.checked, <%# Container.PageRecordIndex %>)" Checked='<%# Container.Value == "True" ? "true" : "false" %>' />
Hope that this will work.
|
|
|
|
|
thnx for yr swift response, but it doesnt work
|
|
|
|
|
Why din't I think of this before?
Ok try this!
<input type="checkbox" onclick="updateSent(this.checked, <%# Container.PageRecordIndex %>)" Checked="<%# IFF((Container.Value = "True"), true, false)%>" />
|
|
|
|
|
Thnx Sir,i tried but i got:
BC30451: Name 'IFF' is not declared.
i tried : Checked="<%# IF((Container.Value = "True"), true, false)%>" />
i got the old error : BC30201: Expression expected.
|
|
|
|
|
alaminfad wrote: i tried : Checked="<%# IF((Container.Value = "True"), true, false)%>" />
mm, try this -
Checked="<%# IF(Container.Value = "True") Then True Else False)%>"
|
|
|
|
|
hello,
i wants to dowload data from one website link with d help of OleDbConnection
Link from which i want data is http://www.cboe.com/LearnCenter/pricehistory.xls[^]
i have did as followes :
string sFileName = "http://www.cboe.com/LearnCenter/pricehistory.xls";
string connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; Data Source = {0}; Extended Properties=Excel 8.0;", sFileName);
OleDbConnection objConn = new OleDbConnection(connectionString);
using (objConn)
{
objConn.Open();
System.Data.DataTable dtSheetData = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
String[] excelSheets = new String[dtSheetData.Rows.Count];
// Add the sheet name to the string array.
foreach (DataRow row in dtSheetData.Rows)
{
excelSheets[iSheetCount] = row["TABLE_NAME"].ToString();
iSheetCount++;
}
OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [" + excelSheets[0] + "] ", objConn);
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter(objCmdSelect);
excelData = new System.Data.DataTable();
objAdapter1.Fill(excelData);
objConn.Close();
}
but it giving me an error at objConn.Open();
wht i have to do??
|
|
|
|
|
Mugdha_Aditya wrote: but it giving me an error at objConn.Open();
Well, we can either spend the rest of the day guessing, or you could tell us the FULL error message, including any inner exceptions. I suspect the latter will help us to help you rather quicker.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Error as
Invalid internet address.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at PrjBussExtEltParser.clsBussExtEltParser.USElementsDataExcel(DataSet dsElements) in C:\Projects\DailyUpdatesExtEleSchedule\PrjBussExtEltParser\clsBussExtEltParser.cs:line 1275
at PrjBussExtEltParser.clsBussExtEltParser.USElementsData(Boolean bIsHistoric) in C:\Projects\DailyUpdatesExtEleSchedule\PrjBussExtEltParser\clsBussExtEltParser.cs:line 1253
at DailyUpdatesExtEleSchedule.Form1.GetUSElementData() in C:\Projects\DailyUpdatesExtEleSchedule\DailyUpdatesExtEleSchedule\Form1.vb:line 2188
|
|
|
|
|
What is the Error ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Error as
Invalid internet address.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at PrjBussExtEltParser.clsBussExtEltParser.USElementsDataExcel(DataSet dsElements) in C:\Projects\DailyUpdatesExtEleSchedule\PrjBussExtEltParser\clsBussExtEltParser.cs:line 1275
at PrjBussExtEltParser.clsBussExtEltParser.USElementsData(Boolean bIsHistoric) in C:\Projects\DailyUpdatesExtEleSchedule\PrjBussExtEltParser\clsBussExtEltParser.cs:line 1253
at DailyUpdatesExtEleSchedule.Form1.GetUSElementData() in C:\Projects\DailyUpdatesExtEleSchedule\DailyUpdatesExtEleSchedule\Form1.vb:line 2188
|
|
|
|