Developer Musings
Wednesday, October 10, 2018
Wednesday, September 26, 2018
Web API - Some basics
Web API - Some basics
What is ASP.Net Web API
API means Application Programming Interface.
This is a framework for building
HTTP based services on top of .Net Framework
These services can be consumed by mobile devices, tablets, browsers and desktop applications
REST means Representational State Transfer, is an architectural pattern
for creating services.
A client sends a request to server and server responds
Standard HTTP methods
GET - To retrieve data from resource
POST - Creates a new entry for data and send to server
PUT - Updates data
DELETE - Delete specific data from server
What is ASP.Net Web API
API means Application Programming Interface.
This is a framework for building
HTTP based services on top of .Net Framework
These services can be consumed by mobile devices, tablets, browsers and desktop applications
REST means Representational State Transfer, is an architectural pattern
for creating services.
A client sends a request to server and server responds
Standard HTTP methods
GET - To retrieve data from resource
POST - Creates a new entry for data and send to server
PUT - Updates data
DELETE - Delete specific data from server
Sunday, May 27, 2018
Linked Server
What is a Linked Server?
Linked servers are configured to enable the Database Engine to execute a SQL statement
that includes tables in another instance of SQL Server, or another database product such as Oracle or ACCESS.
Many types OLE DB data sources can be configured as linked servers, including Microsoft Access and Excel.
Linked servers offer the following advantages:
The ability to access data from outside of SQL Server.
The ability to issue distributed queries, updates, commands, and transactions on
other data sources .
How to create a Linked Server in SQL
1. Connect to sql server through SSMS
2. Right click Linked Server under Server Objects and Select New Linked Server option
3. Give it a name, choose Server Type as SQL server
4. Give instance name of Linked Server
5. Select Security option and Be made using this security option, add Remote login and Password
6. Select OK
7. Under the Catalog, you can see the databases created
You can also create a linked server definition by running sp_addlinkedserver.
We can get details of linked servers by these procedures
exec sp_linkedservers
or
select * from sys.servers
Thursday, October 10, 2013
The Visual Studio language support for VB has not been installed.
The Visual Studio language support for VB has not been installed.
I tried creating a new VB.Net Windows project and received the following error: Microsoft Visual Basic 2005 compiler could not be created. Please re-install Visual Studio.
To fix this issue, we can try to run the following command:
1. Start->All programs->Visual Studio 2005->Visual Studio tools->open Visual Studio 2005 command prompt.
2. Type devenv /resetskippkgs
I tried creating a new VB.Net Windows project and received the following error: Microsoft Visual Basic 2005 compiler could not be created. Please re-install Visual Studio.
To fix this issue, we can try to run the following command:
1. Start->All programs->Visual Studio 2005->Visual Studio tools->open Visual Studio 2005 command prompt.
2. Type devenv /resetskippkgs
Tuesday, October 8, 2013
Creating HTML Editor in C#.net Windows Application
Creating HTML Editor in C#.net Windows Application
1. Create a Windows Application Project and add a form
2. Add the Web Browser control to the Form
3. Add a reference to mshtml
using mshtml;
4. On Form Load add this code
Editor.DocumentText = "<html><body><div></div></body></html>";
doc = Editor.Document.DomDocument as IHTMLDocument2;
doc.designMode = "On";
5. Basic editing operations can be performed using execCommand
eg: webBrowser.Document.ExecCommand("Bold", false, null);
6. To eanble editing use this code
private void Editor_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (Editor.Version.Major >= 9)
{
Editor.Document.Write(Editor.DocumentText);
doc.designMode = "On";
}
}
1. Create a Windows Application Project and add a form
2. Add the Web Browser control to the Form
3. Add a reference to mshtml
using mshtml;
4. On Form Load add this code
Editor.DocumentText = "<html><body><div></div></body></html>";
doc = Editor.Document.DomDocument as IHTMLDocument2;
doc.designMode = "On";
5. Basic editing operations can be performed using execCommand
eg: webBrowser.Document.ExecCommand("Bold", false, null);
6. To eanble editing use this code
private void Editor_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (Editor.Version.Major >= 9)
{
Editor.Document.Write(Editor.DocumentText);
doc.designMode = "On";
}
}
Thursday, March 14, 2013
Oracle versus Sql Server
Description
|
Oracle
|
SQL Server
|
Format Date
|
to_date(dtt_CreatedDate,'DD-MON-YYYY') as dtt_CreatedDate,
|
Convert(varchar,dtt_CreatedDate,106) as dtt_CreatedDate,
|
Null to number
|
NVL(int_UserId,0) as int_UserId,
|
isnull(int_UserId,0) as int_UserId,
|
Current date
|
SYSDATE
|
GETDATE
|
Get substring from string
|
SUBSTR
|
SUBSTRING
|
Find string in string
|
INSTR
|
CHARINDEX
|
Concatenate string
|
CONCAT(str1,str2)
|
Str1 + str2
|
|
if intID=0 then
|
if @intID=0
|
Subscribe to:
Posts (Atom)