Click here to Skip to main content
15,310,642 members

Comments by paul_vin (Top 23 by date)

paul_vin 21-Nov-19 10:50am View
   
Yes, that user is log on server.
also he has sysadmin rights on db server.
some time he is able to execute his query using ssms.
but some time in middle of query execution he is getting above error.
paul_vin 8-Jul-19 5:50am View
   
how I can find what process is using that work table
paul_vin 22-Mar-18 3:39am View
   
hi this is also giving error

Excel.Worksheet activeSheet = ((Excel.Worksheet)(Microsoft.Office.Interop.Excel.Application.ActiveSheet));

an object reference is required for the non static field method or property '_application.activesheet'
paul_vin 22-Mar-18 2:11am View
   
Hi, thanks for advice, I know on forum it take time to answer, but when i search things on google i am not getting it I don't know how it happen. Mostly I trying to search thing on google.
paul_vin 21-Mar-18 9:02am View
   
thanks
paul_vin 15-Mar-18 5:00am View
   
suppose I have put it on following path
D:\
then in following code what should be placed instead of "Product.xml"
xmlFile = XmlReader.Create("Product.xml", new XmlReaderSettings());


when I have Used as
using (XmlReader reader = XmlReader.Create(@"D:\VSTO_Vinayak\Product.xml"))
ds.ReadXml(reader);

it is giving exception as {"Could not find file 'D:\\VSTO_Vinayak\\Product.xml'.":"D:\\VSTO_Vinayak\\Product.xml"}
paul_vin 6-Mar-18 8:49am View
   
Its working but when I am assign list values to string variables if null then throwing exception

MSubject = iteam.Subject.ToString(); // if null throwing exception

if I put it into in if block to handle null
if(iteam.Subject.ToString()!=nuul)
{
MSubject = iteam.Subject.ToString();
}

then MSubject variable is not accessible outside
so how can handle this
paul_vin 5-Mar-18 8:21am View
   
Deleted
public Email FetchEmail(int emailId)
{
if (IsResponseOk(SendCommand("TOP " + emailId + " 0")))
return new Email(ReadLines());
else
return null;
}

protected string ReadLines()
{
StringBuilder b = new StringBuilder();
while (true)
{
string temp = ReadLine();
if (temp == ".\r\n" || temp.IndexOf("-ERR") != -1)
break;
b.Append(temp);
}
return b.ToString();
}



I want Mail Body in Insert Method() but it is giving only following

ContentType = iteam.ContentType.ToString();
From = iteam.From.ToString();
Headers = iteam.Headers.ToString();
Subject = iteam.Subject.ToString();
To = iteam.To.ToString();
MailDate = iteam.UtcDateTime;


Here I want Mail Body Also
paul_vin 16-Feb-18 1:59am View
   
ok thanks for Advice
paul_vin 16-Feb-18 1:56am View
   
I have written code but it is not giving Output as required above

DECLARE @cols AS NVARCHAR(MAX),
@query AS NVARCHAR(MAX)

select @cols = STUFF((SELECT distinct ',' + QUOTENAME(CompanyName)
from tblCompanyData
FOR XML PATH(''), TYPE
).value('.', 'NVARCHAR(MAX)')
,1,1,'')

set @query = 'SELECT Year,' + @cols + '
from
(
select [CompanyName]
,[Year]
,[Sales]
,[TradedSales]
,[TotalSales]
,[Taxes]
,[NetSales]
,[RowMaterial]
,[Power]
,[Consumables]
,[Salaries]
,[ManufacturingCost]
,[OtherExpenses]
,[TotalCost]
,[OperatingProfit]
,[Depreciation]
,[Interest]
,[Profitpostinterest]
,[IncomeTax]
,[NetProfit]
,[ID]
FROM tblCompanyData
) x
pivot
(
max(ID)
for CompanyName in (' + @cols + ')
) p '

execute(@query)
paul_vin 9-Nov-17 1:13am View
   
ok thanks
paul_vin 9-Nov-17 0:57am View
   
I want It for WebForm
paul_vin 11-Sep-17 1:26am View
   
Even I tried using
@mailserver_name = 'smtp.googlemail.com' its not working Same Error

I have also tried
@port = 587
@port = 465
but still error
paul_vin 8-Sep-17 15:01pm View
   
Actually I dont know SMTP server so how can I find @mailserver_name from my PC

in My above case I have found @mailserver_name = 'google-public-dns-b.google.com'
using cmd promt
on command promt I have typed "nslookup" it had given me google-public-dns-b.google.com so for SMTP server How I can find It
paul_vin 7-Sep-17 14:48pm View
   
where I SHOULD MENTION SMTP server address in my code
paul_vin 22-Aug-17 2:35am View
   
First thanks for above solution
How I should restrict to download single user at a time.
would you provide code to me and where I should integrate.
also I have used static path here but i want dynamic path so what changes I
should Do and where
paul_vin 21-Aug-17 12:44pm View
   
Actually when user is login then fist time, it download file with no problem.
But when second time user click on download button then It giving above error Even after i have cleared data table. so for that what should I do. also I want to deploy
that solution on Live project at that time it should be download by any client on client machine in download folder so. so what path i should have to give to download on client Machine
paul_vin 10-Aug-17 4:37am View
   
ok thanks
paul_vin 10-Aug-17 4:02am View
   
[index].Value here Value showing Error i.e Red Line

Code now is

//foreach (DataColumn column in HeaderColumns.Columns)
//{
// string columnName = HeaderColumns.Rows[0][column.ColumnName].ToString();
//}
for (int index = 0; ; ++index)
{
string columnName = HeaderColumns.Rows[0][index].Value.ToString();
if (string.IsNullOrEmpty(columnName))
break;
// etc
}

Showing Error Object does not contain a definition for 'Value' accepting first argument of type object could not be found (are you missing) a using directive or an assembly reference
paul_vin 6-Aug-17 1:48am View
   
string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Mode=Read;Extended Properties=Excel 12.0;Persist Security Info=False";

Even after trying Mode=Read it giving error
as
The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data.
paul_vin 1-Aug-17 6:41am View
   
Actually I dont Know how to share screenshot but problem is as bellow
After Click on Save Button It Display Empty Dialog Box with title as Error
And CloseButton
same for Update Button

and for Insert it is Showing "An error occured while communicating to the server".
and in developer tool It showing as Error in Developer Tool as Failed to load resource: the server responded with a status of 500 (Internal Server Error)
paul_vin 1-Mar-17 4:00am View
   
cn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString);
paul_vin 18-Oct-16 8:07am View
   
Thanks.........!!!!