This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Thursday, August 15, 2013
JD Edwards - How to create parent child relationship for Account master(F0901) Object AC
Tuesday, August 6, 2013
Extract all VBA code from Excel Workbook
How to find UDF value in P6 Primavira
select * from udfcode
select * from udfvalue where udf_text like '%manager%'
select distinct udf_text from udfvalue where udf_text like '%IT Project Manager%'
select * from udfvalue where udf_text like '%Project Manager%'
select * from udfvalue where udf_type_id=330
user_field_330
sp_help projwbs
Thursday, July 25, 2013
Non Parameterized URL Format JD Edwards EnterpriseOne
Monday, July 22, 2013
Excel VBA 2010 - Read a folder and load file name in SQL-Server 2008
Wednesday, July 17, 2013
Run VBA reports in Multiple Instances - Shell
Saturday, May 18, 2013
Cannot connect to MS SQL 2008 R2 locally or remotely - Error 53
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
solution
Error 53 sql server 2008 r2
To enable a server network protocol
1.
In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration.
2.
In the console pane, click Protocols for <instance name>.
3.
In the details pane, right-click the protocol you want to change, and then click Enable or Disable.
4.
In the console pane, click SQL Server Services.
5.
In the details pane, right-click SQL Server (<instance name>), and then click Restart, to stop and restart the SQL Server service.
http://msdn.microsoft.com/en-us/library/ms191294.aspx
Sunday, May 5, 2013
Login from SQL-server in ASP.Net C#
{
bool boolReturnValue = false;
string strConnection = ConnectionString;
SqlConnection Connection = new SqlConnection(strConnection);
string strUserID = UserName;
String strSQL = "select * from UserDetails where UDUSRID=\'" + (strUserID + "\'");
SqlCommand command = new SqlCommand(strSQL, Connection);
SqlDataReader Dr;
Connection.Open();
Dr = command.ExecuteReader();
while (Dr.Read())
{
string UserNameDB = Dr["UDUSRID"].ToString();
string PasswordDB = Dr["UDPASSWD"].ToString();
// string UserRoleDB = Dr["UDROLE"].ToString();
if ((UserName == UserNameDB.TrimEnd().TrimStart()) & (Password == PasswordDB.TrimEnd().TrimStart()))
{
Session["Usrid"] = UserNameDB;
Session["Uspasswd"] = PasswordDB;
// Session["Usrole"] = UserRoleDB;
// Response.Write(Session["Usrole"]);
// Response.End();
boolReturnValue = true;
break;
}
}
Dr.Close();
return boolReturnValue;
}
Send email in a format c#
{
MailMessage objEmail = new MailMessage();
objEmail.To = "xxxxx@xxxxxx.com";//Session["OEMAL"].ToString().Trim();//Emald.ToString().Trim();//txtTo.Text;
//objEmail.To = "dostind@gmail.com";//Session["OEMAL"].ToString().Trim();//Emald.ToString().Trim();//txtTo.Text;
//objEmail.From = "rajeev@xxxxxx.net";
objEmail.From = "noreply@xxxxxx.com";
//objEmail.Cc = txtCc.Text;
objEmail.Subject = "HI -- Notification";// +Strrslt.ToString();
//Response.Write(Session["oename"].ToString()); HI Quiz – Course Completion Notification
//Response.End();
//objEmail.Body = "<table border=1 bgcolor=#F3EFE0><tr><td>Date :</td><td><b>" + DateTime.Today.ToLongDateString() + "</td></tr><tr><td>Exam Id:</td><td>" + Request["id"].ToString() + "</td></tr><tr><td>Trainee:</td><td> </b> " + Session["repname"].ToString() + "</td></tr><tr><td>Total Correct:</td><td>" + cortans + " Out of:-" + totrec + "</td></tr><tr><td>Owner: </td><td>" + Session["oename"].ToString() + "</td></tr><tr><td>Program:</td><td>Home Impovement</td></tr><tr><td><b>Result:</b></td><td><b>" + Strrslt.ToString() + "</b></td></tr> </table>";
objEmail.Body = "<b>The following trainee has completed the Home Improvement training course:</b><br><br>";
objEmail.Body += "<table border=0 width=50% bgcolor=#CCCCCC cellpadding=10 ><tr><td>Trainee :</td><td><b>" + Session["repname"].ToString() + "</td></tr><tr><td>Market:</td><td>" + Session["oeMarket"].ToString() + "</td></tr><tr><td>ICD:</td><td> </b> " + Session["owniNam"].ToString().Replace("'"," ") + "</td></tr><tr><td>Date:</td><td>" + DateTime.Today.ToLongDateString() + "</td></tr><tr><td>Total Correct: </td><td>" + cortans + " Out of:-" + totrec + "</td></tr><tr><td><b>Status:</b></td><td><b>" + Strrslt.ToString() + "</b></td></tr> </table>";
//objEmail.Body = Label4.Text;
//objEmail.Priority = MailPriority.High;
objEmail.BodyFormat = MailFormat.Html;//MailFormat.Html; Session["oeMarket"]
// Make sure you have appropriate replying permissions from your local system
SmtpMail.SmtpServer = "10.0.10.123";
//SmtpMail.SmtpServer = "localhost";
try
{
SmtpMail.Send(objEmail);
}
catch (Exception exc)
{
Response.Write("Send failure: " + exc.ToString());
}
}
private string ConnectionString
{
get
{
string connectionString = ConfigurationManager.ConnectionStrings["smdbConnectionString51"].ConnectionString;
return connectionString;
}
}