|
Perhaps you didn't know about the Quick Answers Section, in which several folks will try to help you at a faster rate than the discussion area here.
But since your here, you should really work on your communication skills in English, or perhaps type in your native language and use a translator to craft your questions.
I really amazed that they don't have forums available in your language or home country. I guessing Spanish or español
[Spanish Version] - Just messing around here with the transalator
Tal vez usted no sabía acerca de la sección Respuestas Rápida, en el que varias personas van a tratar de ayudarle a un ritmo más rápido que el área de discusión aquí.
Pero ya que estás aquí, que realmente debe trabajar en sus habilidades de comunicación en Inglés, o tal vez escribir en su lengua materna y el uso de un traductor para elaborar sus preguntas.
Realmente me sorprendió que no tienen foros disponibles en su idioma o país de origen. Me conjeturando español o spanish
|
|
|
|
|
Hi,
I want to integrate outlook in my asp.net web application.
I want to show <b>Outlook calendar</b> in my application.
But I don't have any idea how to show.
Please Help me.
|
|
|
|
|
Hi Friends, plz help me with this error
My Error is :
An exception of type 'System.InvalidOperationException' occurred in System.Data.dll but was not handled in user code
Additional information: The given value of type String from the data source cannot be converted to type nchar of the specified target column.
String or binary data would be truncated.
My Code:
protected void Button1_Click(object sender, EventArgs e)
{
String strConnection = @"Data Source=MANOJ\SQLEXPRESS;Initial Catalog=MANOJ;Integrated Security=True";
string path = @"C:\Users\Manoj Kumar\Desktop\Update Folder\TESTING.xlsx";
//Create connection string to Excel work book
string excelConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=1\"";
//Create Connection to Excel work book
OleDbConnection excelConnection = new OleDbConnection(excelConnectionString);
OleDbCommand cmd = new OleDbCommand("select *from [Sheet1$]", excelConnection);
excelConnection.Open();
OleDbDataReader dReader;
dReader = cmd.ExecuteReader();
SqlBulkCopy sqlBulk = new SqlBulkCopy(strConnection);
//Give your Destination table name
sqlBulk.DestinationTableName = "TEST";
sqlBulk.WriteToServer(dReader); // Here i getting the above error
excelConnection.Close();
Response.Write("inserted");
}
----- Same code is running Fine when i working on VS 2010 and SQL 2005
Now i use VS 2013 and SQL 2012 Then i getting the error.
PLZ give me the error free code.
|
|
|
|
|
One of the strings in your Excel sheet is longer than the column in your SQL database.
Unfortunately, the error message doesn't tell you which column is causing the problem. There's an open suggestion[^] asking Microsoft to fix it, but no sign of a fix yet.
You'll need to compare the length of the strings in your Excel sheet to the defined size of the columns in your SQL table. When you find the column(s) which are causing the problem, you'll either need to increase the column size in SQL, or truncate the string in Excel.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
check the length of TEST table columns
and see if its smaller than the string you send to the table ?
basically the exception says you are trying to something bigger than the column length.
|
|
|
|
|
|
Hi
I'm having web application connect with sql dbase. When i read data from database and render it to textbox control i used HttpUtility.HtmlDecode to render it, but there is windows application and it also try to render to same value it render as "&" (exact value in database). how can i solve this issue, is there standard way to overcome this issue?
1 . Do i need decode in windows application as well?
2. Is it good to show encode value in web application text box (&)?
|
|
|
|
|
I HTML encode HTML before I store it in a database column, and then decode if I need the HTML to be decoded.
It took me some years to figure it out after trial and error and various scenarios that came up.
Those ampersands for example in AT&T can be quite annoying.
Maybe others do it different.
|
|
|
|
|
1. Do I put my website in the same VS project as the Web API project, or a seperate one? It really isn't clear.
2. Is the authentication cookie based or token based?
Thanks
|
|
|
|
|
1. It depends how you would publish your final product. If your API will be used as an 'private' group of functions by your site - you can put it in the same. However if this API will back different 'clients' (multiple sites) - separate them. (Notice that I wrote 'you can' - the reason is that I would separate them in any case for better maintenance...)
2. Authentication is token based, but that token need to passed between server and client and back. For that ASP.NET uses cookie if enabled, if not query string...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Thanks very much
|
|
|
|
|
I need to open access file (accde) inside web browser in asp.net,what do I do?
|
|
|
|
|
Is it a bad pratice to add a value to ViewBag and hide and show controls based on it's value? Example:
@if (ViewBag.Role == "Admin")
{
@Html.TextBoxFor(m => m.UserName)
@Html.ValidationMessageFor(m => m.UserName)
}
Also, if it is a good way to do things how would you use it to hide and show the parent View's partial views helper controls?
|
|
|
|
|
As ViewBag is valid only for the current request, that means you have to reinitialize Role on every request. You better using session-wide storage (like TempData) for such info...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Thank you for your post. Would it not be better to have a USER Entity Framework table, which contains the the roles ID, and in the controller assign it to the modle value returned to the View like this:
@if(role.ID)
{
...
Now, this is how my boss wants to do it. Have the database that contain a USER table which has a role permissions enum value, then when the Controller looks up the user by AD value the role is checked and used to hide and show UI elements.The only questions I have are these: Along with the USER Entity model object for the Role we are passing back the RECORD Entity which contains data to fill Grids and text boxes to be bound to the View and all of it's partial Views. First, how do we pass back to the View both the ROLE the the RECORD entity data? Second if we use some kind of helper that contains the role can both the main View and it's Partial Views use the helper to hide and show the View controls?
|
|
|
|
|
It sound me a bit over-made...
Search for 'role based authorization in mvc' in Google and you will learn that most of the things you try to develop here already exist...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Now, Im confused. Could you point me to an article explainning this?
|
|
|
|
|
|
I am using the demo provided with the An Expandable .NET Gridview article. When I expand and contract the same row twice, the first time it works OK, but the second time all the content on the detail row is condensed on the first cell of the table. I'm looking at the source code and I have no idea where to look to find the source of this problem. Please help.
|
|
|
|
|
Why not post the question to the author? Use comments section at the bottom of the article...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
You are using a ASP.NET and ADO.NET to create an accounting application for your company.
You are writing code to run a set of stored procedures that perform posting operations in a
database at the end of each month. You use an OleDbConnection object to connect to the
database. You use an OleDbConnection object to connect to the database. You use an
OleDbCommand object to run the stored procedures. If an error occurs during execution of any
of the stored procedures, you want to roll back any data changes that were posted. You want the
changes to be committed only if all of the posting operations succeed. You write code to catch an
OleDbException object if an error occurs during the execution of a stored procedure. What else
should you do?
1. Call the Begin Trasaction method of the OleDbConnection object before running the stored
procedure. If an error occurs, use the OleDbConnection object to roll back the changes.
2. Call the BeginTransaction method of the OleDbConnection object before running the stored
procedures. If an error occurs, use the OleDbException object to roll back the changes.
3. Use the BeginTransaction method of the OleDbConnection object to create an
OleDbTransaction object. Assign the OleDbTransaction object to the Transaction property of
your OleDbCommand object. If an error occurs, use the OleDbTransaction object to roll back
the changes.
4. Use the BeginTransaction method of the OleDbConnection object to create an OleDbTransaction object. Pass a reference to the OleDbTransaction object to each stored procedure. Use error handling inside the stored procedures to roll back the changes
priya
|
|
|
|
|
Problems with homework? Let do yourself a favor - at least try to do it alone!!!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
I m sorry.. But i couldn find out the correct answer......
|
|
|
|
|
And you will not. Except your teacher posted it somewhere on the web...
The only way is to get together all you learned and try to create a solution. If you have a solution that doesn't work correctly (some error) you always can come back here an ask about that specific error, however you will not get an out-of-box solution here specially for home-work assignments...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Thank You...
I'll try to get it done and find solution for this...
|
|
|
|