Skip to main content

Posts

How to get google map image of area you want

How to get google map image of area you want Hi First you need to take one image control and set it Image URL blank. after on code side set it image url as below. ImgMap.ImageUrl = "http://maps.googleapis.com/maps/api/staticmap?sensor=false&key=AIzaSyA4WZ--vZ1qILKrICJg7MdNKZyv1qkiIOw&zoom=14&size=600x512&maptype=roadmap&markers=color:red|label:A|" + "Bapunagar, Ahmedabad, Gujarat"; on Out put  You can get this image in browser. you can use this in contact us page or any searching area related forms.  Thank You for See this.

What is the difference between ExecuteScalar, ExecuteReader and ExecuteNonQuery?

 ExecuteScalar is typically used when your query returns a single value. If it returns more, then the result is the first column of the first row. An example might be SELECT @@IDENTITY AS 'Identity'.  ExecuteReader is used for any result set with multiple rows/columns (e.g., SELECT col1, col2 from sometable).  ExecuteNonQuery is typically used for SQL statements without results (e.g., UPDATE, INSERT, etc.).

Create Database in SQL Server by Sql script

Put below script in sql Editor and change Database_Name to your Database name IF (NOT EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE ('[' + name + ']' = 'Database_Name' OR name = 'Database_Name'))) Begin CREATE DATABASE [Database_Name] ALTER DATABASE Database_Name MODIFY FILE ( NAME = N'Database_Name' , SIZE = 3048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) ALTER DATABASE Database_Name MODIFY FILE ( NAME = N'Database_Name' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) End