|
Ok, I have no clue what all that means
If it's not broken, fix it until it is
|
|
|
|
|
You might get some traction with this[^].
|
|
|
|
|
I understand what Geocoding is. I don't understand how to code it. Again, I'm hoping for an API or other service that I can get started with.
If it's not broken, fix it until it is
|
|
|
|
|
You didn't look down the page, did you? And it's reverse geocoding that you're looking for, not geocoding. The link I posted shows the details of web service calls you can make to get the results. All you need to do is call into the service - I would opt for the json version if I were doing this.
|
|
|
|
|
So it is a cost thing!
Back in the old day - 2001 and in the UK again we could get postcode/geo info on CD from one of the mapping companies, it did cost but was reasonable. Postcodes in the UK represent as few as 6 houses.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
hi there !
i have BAD DATA EXP !
MY APP WORK FINE IN LOCAL BUT WHEN I RUN IT IN THE NETWORK THE SERVER APP THROW THE BAD DATA EXP !?
CODE : C#
CLIENT :
public byte[] ENC(string strdata, CspParameters prk)
{
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(prk);
byte[] data = rsa.Encrypt(Encoding.Unicode.GetBytes(strdata),false);
MessageBox.Show(data.Length.ToString()); return data;
}
void clint(byte[] data)
{
try
{
object op = (object)data;
BinaryFormatter br = new BinaryFormatter();
TcpClient myclient = new TcpClient("192.168.43.152", 7000);
NetworkStream myns = myclient.GetStream();
br.Serialize(myns, op);
myclient.Close();
}
catch (Exception e)
{
clint(data);
}
}
/////////////////
.
.
.
CspParameters cp = new CspParameters();
cp.KeyContainerName = "25522100";
string usb = ":RIO";
string Name = System.Environment.MachineName;
Name += usb;
mymsg = ENC(Name, cp);
clint(mymsg);
SERVER :
<pre> mytcp = new TcpListener(7000);
mytcp.Start();
mysocket = mytcp.AcceptSocket();
myns = new NetworkStream(mysocket);
BinaryFormatter br = new BinaryFormatter();
object op;
op = br.Deserialize(myns);
data = (byte[])op;
MessageBox.Show(data.Length.ToString());
CspParameters cp = new CspParameters();
cp.KeyContainerName = "25522100";
byte[] messge = DEC(data, cp);
//////////////////////
.
.
.
public byte[] DEC(byte[] en_data, CspParameters key)
{
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(key);
byte[] data1 = rsa.Decrypt(en_data, false);
return data1;
}
ANY HELP !
modified 7-Oct-13 12:35pm.
|
|
|
|
|
DON'T SHOUT
The IP-address is of a computer in local network; it will not be available on the internetz. You'll need to figure out your public IP and adjust the router to point to that specific server.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
its LAN network
there is server run windows server 2008
and pc run windows 7
thnx for ur help
|
|
|
|
|
|
Add some logging on the server side to find out where the exception gets thrown, and which data caused it.
|
|
|
|
|
|
Hi,
I am trying to send some text to notepad using SendKeys.Send("Hello World!") instead SendKeys.SendWait("Hello World!"). But I could not send and facing problem.
Error is:
"SendKeys cannot run inside this application because the application is not handling Windows messages. Either change the application to handle messages, or use the SendKeys.SendWait method."
Thank you
namespace Send_Key
{
class Program
{
[DllImport("user32.dll", SetLastError = true, EntryPoint = "FindWindow", CharSet = CharSet.Auto)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true, EntryPoint = "SetForegroundWindow")]
static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true, EntryPoint = "ShowWindow")]
static extern bool ShowWindow(IntPtr hWnd, int cmCommand);
static IntPtr hwnd;
static void Main(string[] args)
{
Process notePad = new Process();
notePad.StartInfo.FileName = "notepad.exe";
notePad.Start();
System.Threading.Thread.Sleep(1000);
SetForegroundWindow(hWnd);
System.Threading.Thread.Sleep(1000);
SendKeys.Send("Hello World!");
}
}
}
modified 7-Oct-13 5:14am.
|
|
|
|
|
You are not setting NotePad as the ForegroundWindow correctly. Try:
SetForegroundWindow(notePad.MainWindowHandle);
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
modified 7-Oct-13 16:04pm.
|
|
|
|
|
Your Thread.Sleep lines can be removed. You don't need them. Also, the numbers you have in there are just arbitrary and make certain assumptions about the performance if the system.
A better way to wait for Notepad to launch is:
notePad.WaitForInputIdle();
|
|
|
|
|
I have the byte array of my mp4 video, how can I play it without saving to my laptop/hard disk?
Thanks.
|
|
|
|
|
You can embed Windows media player in your code and open the audio URL via the player.
Note that the file will still be temporarily cached to your hard drive.
|
|
|
|
|
A few months ago, I wrote an article about dynamically loading classes at runtime:
The "Rule-O-Nator" - An example of dynamically loading classes at runtime[^]
For me, it was eye opening when Darek Danielewski gently asked, "Hey did you know about this thing called MEF?" DOE!!! Time to teach this old dog new tricks....
Since then, I've spent considerable time banging my head on my desk and getting over the hurdles. Almost all of the examples are extremely simplistic, copies of MS Calculator example, and not much time is spent talking about using MEF in the real world. I ultimately wrote a wrapper to make it easier to plug MEF into existing applications and to simplify a few things like composition, managing the catalog and container, diagnostics and debugging, avoiding pitfalls when using MEF in threads, etc.
Do you think there's any intrest for a .Net MEF wrapper, and an article about it on codeproject?
Would it be better to post the wrapper as a separate article and then smaller posts on using the wrapper vs a single article?
I'm also looking for some sanity checks. Would someone like to review the wrapper?
Look forward to to your thoughts and suggestions.
Best,
-james
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
As you know, I really liked the Rule-O-Nator article, and I'd definitely like to see an article on MEF by you.
thanks, Bill
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
Hey Bill! Thanks for the vote of confidence.
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
Article Please!!
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Hey Brisingr,
Thanks for the input!
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
Definitely do the article please, then push out as many real world examples as you are willing to publish.
I find real world examples so much more useful, it may not be relevant to our problem but it allows us to see how a problem was solved.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It really depends what you are trying to do with the wrapper. When I started MEF, the biggest issues for me were things like clear examples of resolving multiple versions of the same interface - as well as interface versioning, plus custom catalogs. Also, you might want to cover what you get from MEF 2 as well as MEF 1.
|
|
|
|
|
Hi All,
I need your assitance with the following:
i have created a small application that is taking information from a DB, puting it in a datagridview and then will create a KML file.
i have add support on the datagridview from a previous post and now i am stuck with the following:
basically the sql query will give you the following:
State Name Long Lat
Day AZ1 11.11111 22.2222
Day AZ1 11.22222 22.3333
Day AZ1 11.33333 22.4444
Day AZ1 11.44444 22.5555
Day AZ2 11.11111 22.2222
Day AZ2 22.22222 33.3333
Day AZ2 22.33333 33.4444
Day AZ2 22.44444 33.5555
Night AZ1 11.11111 22.2222
Night AZ1 11.22222 22.3333
Night AZ1 11.33333 22.4444
Night AZ1 11.44444 22.5555
Night AZ5 55.11111 66.2222
Night AZ5 55.22222 66.3333
Night AZ5 55.33333 66.4444
Night AZ5 55.44444 66.5555
The output of the creatkml should be a kml file ( i know how to create it, just have issues with putting the above correctly)
<Folder>
<name>Day</name>
<Placemark>
<name>AZ1</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
11.11111,22.2222,0 11.22222,22.3333,01 1.33333,22.4444,0 11.44444,22.5555,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>AZ2</name>
< styleUrl>#m_ylw-pushpin</styleUrl>
< Polygon>
< tessellate>1</tessellate>
< outerBoundaryIs>
< LinearRing>
< coordinates>
11.11111,22.2222,0 22.22222,33.3333,0 22.33333,33.4444,0 22.44444,33.5555
< /coordinates>
< /LinearRing>
</outerBoundaryIs>
< /Polygon>
</Placemark>
</Folder>
<Folder>
<name>Night</name>
...
.
.
..... basically the same as the above placemarks just with the night names
when clicking on the createKML button the application stops with the following error in the phase of :
LatLongCollectionByName.Add(matchHandle, lst);
ERROR MESSAGE "An item with the same key has already been added."
the attached code is suppose to collect all the names and the points (without the state value. this is something new i added).
i have uploaded the code and a small sample of the DB
hope i am clear
thanks alot
Jonathan
<pre lang="c#">
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Threading;
using System.IO;
using System.Diagnostics;
using Microsoft.SqlServer.Management.Smo;
using System.Linq;
namespace WisToKML
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
DisconnectBtn.Enabled = false;
KMLDestinationTB.Enabled = false;
DBConBtn.Enabled = false;
userTB.Text = "sa";
PassTB.Text = "Password!";
//FromDate.CustomFormat = "2013-06-01";
//FromDate.Format = DateTimePickerFormat.Custom;
//TODate.CustomFormat = "2013-06-01";
//TODate.Format = DateTimePickerFormat.Custom;
}
private void Form1_Load(object sender, EventArgs e)
{
BrowseBtn.Enabled = false;
DataTable dt = SmoApplication.EnumAvailableSqlServers(true);
DBSrvTB.ValueMember = "Name";
DBSrvTB.DataSource = dt;
}
private void DBSrvTB_SelectedIndexChanged(object sender, EventArgs e)
{
DBNameTB.Items.Clear();
if (DBSrvTB.SelectedIndex != -1)
{
string serverName = DBSrvTB.SelectedValue.ToString();
Server server = new Server(serverName);
try
{
foreach (Database database in server.Databases)
{
DBNameTB.Items.Add(database.Name);
}
}
catch (Exception ex)
{
string exception = ex.Message;
}
}
}
private void DBConBtn_Click(object sender, EventArgs e)
{
if ((DBNameTB.Text == null) || (DBNameTB.Text == ""))
{
MessageBox.Show("Database Name is missing", "Error");
return;
}
else
{
try
{
string username = userTB.Text;
string password = PassTB.Text;
string server = DBSrvTB.Text;
string database = DBNameTB.Text;
string ConnectionString = "User ID=" + username + ";" + "Password=" + password + ";" + "Database=" + database + ";" + "server=" + server;
SqlConnection connection = new SqlConnection(ConnectionString);
connection.Open();
// MessageBox.Show("DB Connected","(Connected)");
DBConBtn.Enabled = false;
DBConBtn.Text = "DB Connected";
DBConBtn.BackColor = Color.Green;
BrowseBtn.Enabled = true;
DisconnectBtn.Enabled = true;
}
catch (Exception ex)
{
MessageBox.Show("DB Authentication Failed", "Error");
return;
}
}
}
private void DisconnectBtn_Click(object sender, EventArgs e)
{
string username = userTB.Text;
string password = PassTB.Text;
string server = DBSrvTB.Text;
string database = DBNameTB.Text;
string ConnectionString = "User ID=" + username + ";" + "Password=" + password + ";" + "Database=" + database + ";" + "server=" + server;
SqlConnection connection = new SqlConnection(ConnectionString);
connection.Close();
DBConBtn.Enabled = true;
DBConBtn.BackColor = default(Color);
DisconnectBtn.Enabled = false;
BrowseBtn.Enabled = false;
}
#region Class LatLongPair
class LatLongPair
{
public double Lat { get;set; }
public double Lon { get;set; }
}
#endregion
private void button3_Click(object sender, EventArgs e)
{
#region testing new code from web
// this is a new code from the web
Dictionary<string, List<LatLongPair>> LatLongCollectionByName = new Dictionary<string, List<LatLongPair>>();
List<LatLongPair> lst = null;
LatLongPair lPair = null;
string matchHandle = string.Empty;
for (int i = 0; i < LayersGrid.Rows.Count; i++)
{
if (LayersGrid.Rows[i].Cells[1].Value.ToString() == matchHandle)
{
lPair.Lat = Convert.ToDouble(LayersGrid.Rows[i].Cells[3].Value);
lPair.Lon = Convert.ToDouble(LayersGrid.Rows[i].Cells[2].Value);
lst.Add(lPair);
}
else
{
matchHandle = LayersGrid.Rows[i].Cells[1].Value.ToString();
lPair = new LatLongPair();
lPair.Lat = Convert.ToDouble(LayersGrid.Rows[i].Cells[3].Value);
lPair.Lon = Convert.ToDouble(LayersGrid.Rows[i].Cells[2].Value);
lst = new List<LatLongPair>();
lst.Add(lPair);
LatLongCollectionByName.Add(matchHandle, lst);
}
foreach (KeyValuePair<string, List<LatLongPair>> item in LatLongCollectionByName)
{
Console.WriteLine("\n For name : " + item.Key + ", lat/long vaues are:\n");
foreach (LatLongPair lp in item.Value)
{
Console.Write("\t" + lp.Lat + ",\t" + lp.Lon + " | ");
}
}
//end of new code from web
#endregion
#region KML Header & Footer
string kmlheader = "=" + "=" + "" + "\r\n";
string kmlheader1 = "<kml xmlns=" + "\"" + "http://www.opengis.net/kml/2.2" + "\"" + " xmlns:gx=" + "\"" + "http://www.google.com/kml/ext/2.2" + "\"" + " xmlns:kml=" + "\"" + "http://www.opengis.net/kml/2.2" + "\"" + " xmlns:atom=" + "\"" + "http://www.w3.org/2005/Atom" + "\"" + ">" + "\r\n" + "<Document>" + "\r\n";
string kmlfooter = "</Document>" + "\r\n" + "</kml>";
#endregion
#region KML Document Name
string kmldocname = "\t" + "<name>" + sitenameTB.Text + "</name>" + "\r\n";
#endregion
#region KML Style
string stylemap = "\t" + "<StyleMap id=" + "\"" + "msn_polygon" + "\"" + ">" + "\r\n" + "\t" + "\t" + "<pair>" + "\r\n" + "\t" + "\t" + "\t" + "<key>normal</key>" + "\r\n" + "\t" + "\t" + "\t" + "<styleUrl>#sn_polygon</styleUrl>" + "\r\n" + "\t" + "\t" + "</pair>" + "\r\n" + "\t" + "\t" + "<pair>" + "\r\n" + "\t" + "\t" + "\t" + "<key>highlight</key>" + "\r\n" + "\t" + "\t" + "\t" + "<styleUrl>#sh_polygon</styleUrl>" + "\r\n" + "\t" + "\t" + "</pair>" + "\r\n" + "\t" + "</StyleMap>" + "\r\n";
string styleid_highlight = "\t" + "<Style id=" + "\"" + "sh_polygon" + "\"" + ">" + "\r\n" + "\t" + "\t" + "<IconStyle>" + "\r\n" + "\t" + "\t" + "\t" + "<color>ff00ff55</color>" + "\r\n" + "\t" + "\t" + "\t" + "<scale>0.709091</scale>" + "\r\n" + "\t" + "\t" + "\t" + "<Icon>" + "\r\n" + "\t" + "\t" + "\t" + "\t" + "<href>http://maps.google.com/mapfiles/kml/shapes/polygon.png</href>" + "\r\n" + "\t" + "\t" + "\t" + "</Icon>" + "\r\n" + "\t" + "\t" + "</IconStyle>" + "\r\n" + "\t" + "\t" + "<LabelStyle>" + "\r\n" + "\t" + "\t" + "\t" + "<scale>0.6</scale>" + "\r\n" + "\t" + "\t" + "</LabelStyle>" + "\r\n" + "\t" + "\t" + "<ListStyle></ListStyle>" + "\r\n" + "\t" + "</Style>" + "\r\n";
string styleid_normal = "\t" + "<Style id=" + "\"" + "sn_polygon" + "\"" + ">" + "\r\n" + "\t" + "\t" + "<IconStyle>" + "\r\n" + "\t" + "\t" + "\t" + "<color>ff00ff55</color>" + "\r\n" + "\t" + "\t" + "\t" + "<scale>0.709091</scale>" + "\r\n" + "\t" + "\t" + "\t" + "<Icon>" + "\r\n" + "\t" + "\t" + "\t" + "\t" + "<href>http://maps.google.com/mapfiles/kml/shapes/polygon.png</href>" + "\r\n" + "\t" + "\t" + "\t" + "</Icon>" + "\r\n" + "\t" + "\t" + "</IconStyle>" + "\r\n" + "\t" + "\t" + "<LabelStyle>" + "\r\n" + "\t" + "\t" + "\t" + "<scale>0.6</scale>" + "\r\n" + "\t" + "\t" + "</LabelStyle>" + "\r\n" + "\t" + "\t" + "<ListStyle></ListStyle>" + "\r\n" + "\t" + "</Style>" + "\r\n";
#endregion
#region kml file writer definition
StreamWriter KMLwriter = new System.IO.StreamWriter(KMLDestinationTB.Text + "\\" + sitenameTB.Text + ".kml", false);
#endregion
#region kml writer
KMLwriter.WriteLine(kmlheader + kmlheader1 + kmldocname + stylemap + styleid_highlight + styleid_normal);
//KMLwriter.Close();
KMLwriter.WriteLine("\t" + "<Placemark>" + "\r\n");
// KMLwriter.WriteLine("\t" + "\t" + "<name>" + LayersGrid.Rows.Cells["Target ID"].Value + "</name>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "<styleUrl>#msn_polygon</styleUrl>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "<Polygon>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "<tessellate>1</tessellate>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "\t" + "<outerBoundaryIs>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "\t" + "<LinearRing>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "\t" + "<coordinates>" + "\r\n");
#endregion
#region this is old code
//this is the old code
/*
for (int i = 1; i < LayersGrid.Rows.Count; i++)
{
if (LayersGrid.Rows[i].Cells["Name"] != null)
{
if (LayersGrid.Rows[i].Cells["Name"].Value.ToString() == LayersGrid.Rows[i - 1].Cells["Name"].Value.ToString())
{
// DO XXXXXXXXXXX
}
else
{
// DO YYYYYYYYYY
// MessageBox.Show(LayersGrid.Rows[i].Cells.ToString(), "different names");
try
{
KMLwriter.WriteLine("\t" + "\t" + "\t" + LayersGrid.Rows[i].Cells["Longitude"].Value + "," + LayersGrid.Rows[i].Cells["Latitude"].Value + ",0" + "\r\n");
}
catch (NullReferenceException ex)
{
}
}
}
}
*/
// end this is the old code
#endregion
#region KML Writer
KMLwriter.WriteLine("\t" + "\t" + "\t" + "</coordinates>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "\t" + "</outerBoundaryIs>" + "\r\n");
KMLwriter.WriteLine("\t" + "\t" + "</Polygon>" + "\r\n");
KMLwriter.WriteLine("\t" + "</Placemark>" + "\r\n");
KMLwriter.WriteLine(kmlfooter);
KMLwriter.Close();
#endregion
#region oldcode
//foreach (DataGridViewRow row in LayersGrid.Rows)
//{
// #region writing KML for each row
// //if (row.Cells["Name"].Value != null)
// //{
// // KMLwriter.WriteLine("\t" + "<Placemark>" + "\r\n");
// // KMLwriter.WriteLine("\t" + "\t" + "<name>" + row.Cells["Name"].Value + "</name>" + "\r\n");
// // KMLwriter.WriteLine("\t" + "\t" + "<LookAt>" + "\r\n" + "\t" + "\t" + "<longitude>" + row.Cells["Longitude"].Value + "</longitude>" + "\r\n" + "\t" + "\t" + "<latitude>" + row.Cells["Latitude"].Value + "</latitude>" + "\r\n" + "\t" + "\t" + "<altitude>0</altitude>" + "\r\n" + "\t" + "\t" + "<heading>1</heading>" + "\r\n" + "\t" + "\t" + "<tilt>0</tilt>" + "\r\n" + "\t" + "\t" + "<range>5000</range>" + "\r\n" + "\t" + "\t" + "<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>" + "\r\n" + "\t" + "</LookAt>" + "\r\n");
// // KMLwriter.WriteLine("\t" + "\t" + "<styleUrl>#msn_polygon</styleUrl>");
// // KMLwriter.WriteLine("\t" + "\t" + "<Point>" + "\r\n" + "\t" + "\t" + "\t" + "<coordinates>" + row.Cells["Longitude"].Value + "," + row.Cells["Latitude"].Value + ",0" + "</coordinates>" + "\r\n" + "\t" + "\t" + "</Point>" + "\r\n");
// // KMLwriter.WriteLine("\t" + "</Placemark>" + "\r\n");
// //}
// #endregion
// //***************** testing comparinson ***********************
// #region bool function
// bool functionname;
//{
// if (LayersGrid.RowCount == 0)
// {
// // return false; // or true? Your call
// MessageBox.Show("empty table");
// }
// // Get cell value in first row
// object oldValue = LayersGrid.Rows[0].Cells[0].Value;
// for (int i = 1; i < LayersGrid.RowCount; ++i)
// {
// if (LayersGrid.Rows[i].Cells[0].Value != oldValue)
// {
// // return false; // they are some differences
// MessageBox.Show("there are different layers");
// }
// }
// // All cells are the same as the one in first row
// // return true;
// MessageBox.Show("only one layer");
//} //closing bool function
//#endregion
//} //close for loop
#endregion
}
}
private void DBNameTB_SelectedIndexChanged(object sender, EventArgs e)
{
if (DBNameTB.Text != null)
{
DBConBtn.Enabled = true;
}
}
private void LyrLoadData_Click(object sender, EventArgs e)
{
string username = userTB.Text;
string password = PassTB.Text;
string server = DBSrvTB.Text;
string database = DBNameTB.Text;
string ConnectionString = "User ID=" + username + ";" + "Password=" + password + ";" + "Database=" + database + ";" + "server=" + server;
string ignore = "select * from Layers";
MessageBox.Show(ignore);
//testing new connection
// String reportQuery = @" complicated query returning many rows ";
SqlConnection ReportConnect = new SqlConnection(ConnectionString);
ReportConnect.Open();
SqlCommand command = new SqlCommand(ignore, ReportConnect);
command.CommandTimeout = 300; //5 mins
DataSet tempDataset = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(command);
DataSet ds = new DataSet();
da.Fill(ds, "Layers");
// connection.Open();
LayersGrid.DataSource = ds;
LayersGrid.DataMember = "Layers";
//
}
<pre lang="c#">
}
}
thanks
Jonathan
|
|
|
|
|