Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Wednesday, March 21, 2012

Pocket PC database connection

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class

Please see this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=184007&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=235638&SiteID=1

If it still does not work after you fixed your 'localhost' issue:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=270532&SiteID=1

Also, we have forum dedicated to SQL Mobile. Please post to it should you have any SQL or SQL Mobile related questions:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

|||

Thanks for your reply.

I would like to install vxUtil, and I have already read the readme.txt file. But I still have some questions about that. Should vxUtil be installed on my personal PC or the Pocket PC(PPC)? If it should be installed in the PPC, how can I install? In the readme.txt, I get the following information:


Open the appropriate folder on the hard drive then double-click
on the InstallCE icon to start the install process for the correct device.

From this information, I feel that vxUtil should be installed in my personal PC. Is it correct?

Could you please answer me about that?

Thanks a lot.

|||

vxUtil should be ultimately installed on device. However, like pretty much all Pocket PC products, it goes through desktop and Active Sync. You install/unzip application on to desktop, then you (or desktop installer) execute something which would push it to device via AS. As a developer you would have to do the same for your application eventually. In some cases there's no desktop installer, just a device CAB file. In that case simply copy CAB to device and click on it from device's file explorer.

|||

Dear Ilya Tumanov,

Your answer is so great. I have already installed it into the PPC, and it scanned the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program that I posted yesterday and listed above can not still work. What do I need in the next step?

Moreover, I have changed the connection string to

Dim strConnection As String = "Server=Server1;Integrated Security=SSPI;database=AdventureWorks"

Thanks a lot.

|||

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied."

I have already installed vxUtil into the PPC, and Ping is OK. I use it to scan the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program can not still work.

Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=server1;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class


|||

Default SQL Server port is 1433 which is not opened so it's not going to work until your SQL Server is properly configured. Also you have to provide credential in connection string, this string is not going to work.

I'm moving this thread to appropriate forum.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

This should work:

"Server=YourServerHere,1433;Initial Catalog=YourDataBaseHere;User ID=YourLoginHere;Password=YourPasswordHere;Integrated Security=SSPI;"

Note you have to provide login and password even though windows authentication will be used. That's because there's no login procedure on devices.

|||

Dear Ilya Tumanov,

Thanks a lot for your so many helps, and it works.

|||

so..It must have a password?is it same with windows user's password?what if blank?

if I'm not wrong, if we set the windows password, we should change the SQL password too right?

|||

you should check this link http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=709129&SiteID=1&mode=1

It works for me after a loooooonggg time testing

Pocket PC database connection

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class

Please see this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=184007&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=235638&SiteID=1

If it still does not work after you fixed your 'localhost' issue:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=270532&SiteID=1

Also, we have forum dedicated to SQL Mobile. Please post to it should you have any SQL or SQL Mobile related questions:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

|||

Thanks for your reply.

I would like to install vxUtil, and I have already read the readme.txt file. But I still have some questions about that. Should vxUtil be installed on my personal PC or the Pocket PC(PPC)? If it should be installed in the PPC, how can I install? In the readme.txt, I get the following information:


Open the appropriate folder on the hard drive then double-click
on the InstallCE icon to start the install process for the correct device.

From this information, I feel that vxUtil should be installed in my personal PC. Is it correct?

Could you please answer me about that?

Thanks a lot.

|||

vxUtil should be ultimately installed on device. However, like pretty much all Pocket PC products, it goes through desktop and Active Sync. You install/unzip application on to desktop, then you (or desktop installer) execute something which would push it to device via AS. As a developer you would have to do the same for your application eventually. In some cases there's no desktop installer, just a device CAB file. In that case simply copy CAB to device and click on it from device's file explorer.

|||

Dear Ilya Tumanov,

Your answer is so great. I have already installed it into the PPC, and it scanned the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program that I posted yesterday and listed above can not still work. What do I need in the next step?

Moreover, I have changed the connection string to

Dim strConnection As String = "Server=Server1;Integrated Security=SSPI;database=AdventureWorks"

Thanks a lot.

|||

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied."

I have already installed vxUtil into the PPC, and Ping is OK. I use it to scan the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program can not still work.

Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=server1;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class


|||

Default SQL Server port is 1433 which is not opened so it's not going to work until your SQL Server is properly configured. Also you have to provide credential in connection string, this string is not going to work.

I'm moving this thread to appropriate forum.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

This should work:

"Server=YourServerHere,1433;Initial Catalog=YourDataBaseHere;User ID=YourLoginHere;Password=YourPasswordHere;Integrated Security=SSPI;"

Note you have to provide login and password even though windows authentication will be used. That's because there's no login procedure on devices.

|||

Dear Ilya Tumanov,

Thanks a lot for your so many helps, and it works.

|||

so..It must have a password?is it same with windows user's password?what if blank?

if I'm not wrong, if we set the windows password, we should change the SQL password too right?

|||

you should check this link http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=709129&SiteID=1&mode=1

It works for me after a loooooonggg time testing

Pocket PC database connection

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied." Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=localhost;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class

Please see this:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=184007&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=235638&SiteID=1

If it still does not work after you fixed your 'localhost' issue:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=270532&SiteID=1

Also, we have forum dedicated to SQL Mobile. Please post to it should you have any SQL or SQL Mobile related questions:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

|||

Thanks for your reply.

I would like to install vxUtil, and I have already read the readme.txt file. But I still have some questions about that. Should vxUtil be installed on my personal PC or the Pocket PC(PPC)? If it should be installed in the PPC, how can I install? In the readme.txt, I get the following information:


Open the appropriate folder on the hard drive then double-click
on the InstallCE icon to start the install process for the correct device.

From this information, I feel that vxUtil should be installed in my personal PC. Is it correct?

Could you please answer me about that?

Thanks a lot.

|||

vxUtil should be ultimately installed on device. However, like pretty much all Pocket PC products, it goes through desktop and Active Sync. You install/unzip application on to desktop, then you (or desktop installer) execute something which would push it to device via AS. As a developer you would have to do the same for your application eventually. In some cases there's no desktop installer, just a device CAB file. In that case simply copy CAB to device and click on it from device's file explorer.

|||

Dear Ilya Tumanov,

Your answer is so great. I have already installed it into the PPC, and it scanned the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program that I posted yesterday and listed above can not still work. What do I need in the next step?

Moreover, I have changed the connection string to

Dim strConnection As String = "Server=Server1;Integrated Security=SSPI;database=AdventureWorks"

Thanks a lot.

|||

Hi,

I am developing an application for a Pocket PC (PPC). I am using Visual studio 2005, and the Operating system on this PPC is Window Mobile 2003 SE. The followings are my codes to connect PPC with the database on my PC with sql server 2005. But when I cick the button1, the error with "SQL Server does not exist or access denied."

I have already installed vxUtil into the PPC, and Ping is OK. I use it to scan the ports in my desktop PC. From the result, the ports 25, 80, 135, 139, 443, 445, 990 and1025 are all open. But the program can not still work.

Any ideas? Thanks a lot.

Imports System.IO

Imports System.Data

Imports System.Data.SqlClient

Imports System.Math

Imports System.Drawing

Imports System

Public Class Form1

Dim strConnection As String = "Server=server1;Integrated Security=SSPI;database=AdventureWorks"

Dim strQuery As String

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label1.Text = "Hello, Clicking after."

ReadOrderData()

End Sub

Private Sub ReadOrderData()

Dim queryString As String = "select * from Person.Address where AddressID < '10'"

Using connection As New SqlConnection(strConnection)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

While reader.Read()

MsgBox(String.Format("{0}, {1}", _

reader(0), reader(1)))

End While

reader.Close()

End Using

End Sub

End Class


|||

Default SQL Server port is 1433 which is not opened so it's not going to work until your SQL Server is properly configured. Also you have to provide credential in connection string, this string is not going to work.

I'm moving this thread to appropriate forum.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

Hi,

Thanks for your answer, and right now 1433 port is open. I would like to use windows authentication protocol. Could you please provide a sample for the connection string? Thanks a lot.

|||

This should work:

"Server=YourServerHere,1433;Initial Catalog=YourDataBaseHere;User ID=YourLoginHere;Password=YourPasswordHere;Integrated Security=SSPI;"

Note you have to provide login and password even though windows authentication will be used. That's because there's no login procedure on devices.

|||

Dear Ilya Tumanov,

Thanks a lot for your so many helps, and it works.

|||

so..It must have a password?is it same with windows user's password?what if blank?

if I'm not wrong, if we set the windows password, we should change the SQL password too right?

|||

you should check this link http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=709129&SiteID=1&mode=1

It works for me after a loooooonggg time testing

sql

Tuesday, March 20, 2012

plz help me

Hello every one ...

i m developing a website using asp.net and sql server .. & need to send email after registration and i know i need to configure Sql Mail ...

so plz tel me wht i needto do, to configure sql mail ... i m using sql server 2000 ..

OS: XP Pro with service pack 2

can i configure my mail client through Outlook 2003 or i need to have Ms Exchange server ...

plz guyz guide me step by step wht i need to do ...

Thanx for ur Cooperation
Kamran SorathiaHere is a link that might help:

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci980136,00.html

Monday, February 20, 2012

Please Help!How to get directories list for remote machine?

Hello,
We are developing appl. Backup/Restore database using SQLServerAgent.
In my appl. I want to do the same as in the SQL Enterprise(2000),
when I select server for backup, Enterprise display brower list (hard
disks>dir...) for selected machine.
How I can get the browser(Hards>dirs) for selected machine?
Thanks in advance,
Pola
Pola
How does your question relate to SQL Server? Perhaps some controls provided
with .NET technology may help you.
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>
|||Rather than using SQL Server, I suggest you consider WMI queries to
enumerate remote resources. C# example:
//System.Management rreference required
ObjectQuery localDiskQuery =
new ObjectQuery("SELECT Name FROM Win32_LogicalDisk WHERE DriveType =
3");
using (ManagementObjectSearcher searcher =
new ManagementObjectSearcher(localDiskQuery))
{
searcher.Scope =
new ManagementScope(string.Format(@."//{0}/root/cimv2",
ServerName));
foreach (ManagementObject logicalDisk in searcher.Get())
{
Console.WriteLine(WriteLine(logicalDisk["Name"].ToString());
}
}
Hope this helps.
Dan Guzman
SQL Server MVP
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>

Please Help!How to get directories list for remote machine?

Hello,
We are developing appl. Backup/Restore database using SQLServerAgent.
In my appl. I want to do the same as in the SQL Enterprise(2000),
when I select server for backup, Enterprise display brower list (hard
disks>dir...) for selected machine.
How I can get the browser(Hards>dirs) for selected machine?
Thanks in advance,
PolaPola
How does your question relate to SQL Server? Perhaps some controls provided
with .NET technology may help you.
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>|||Rather than using SQL Server, I suggest you consider WMI queries to
enumerate remote resources. C# example:
//System.Management rreference required
ObjectQuery localDiskQuery =
new ObjectQuery("SELECT Name FROM Win32_LogicalDisk WHERE DriveType =
3");
using (ManagementObjectSearcher searcher =
new ManagementObjectSearcher(localDiskQuery)
)
{
searcher.Scope =
new ManagementScope(string.Format(@."//{0}/root/cimv2",
ServerName));
foreach (ManagementObject logicalDisk in searcher.Get())
{
Console.WriteLine(WriteLine(logicalDisk["Name"].ToString());
}
}
Hope this helps.
Dan Guzman
SQL Server MVP
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>

Please Help!How to get directories list for remote machine?

Hello,
We are developing appl. Backup/Restore database using SQLServerAgent.
In my appl. I want to do the same as in the SQL Enterprise(2000),
when I select server for backup, Enterprise display brower list (hard
disks>dir...) for selected machine.
How I can get the browser(Hards>dirs) for selected machine?
Thanks in advance,
PolaPola
How does your question relate to SQL Server? Perhaps some controls provided
with .NET technology may help you.
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>|||Rather than using SQL Server, I suggest you consider WMI queries to
enumerate remote resources. C# example:
//System.Management rreference required
ObjectQuery localDiskQuery = new ObjectQuery("SELECT Name FROM Win32_LogicalDisk WHERE DriveType =3");
using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(localDiskQuery))
{
searcher.Scope = new ManagementScope(string.Format(@."//{0}/root/cimv2",
ServerName));
foreach (ManagementObject logicalDisk in searcher.Get())
{
Console.WriteLine(WriteLine(logicalDisk["Name"].ToString());
}
}
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Pola" <Pola@.discussions.microsoft.com> wrote in message
news:05C7D6B8-E7A0-4545-90E2-4B4B36C87663@.microsoft.com...
> Hello,
> We are developing appl. Backup/Restore database using SQLServerAgent.
> In my appl. I want to do the same as in the SQL Enterprise(2000),
> when I select server for backup, Enterprise display brower list (hard
> disks>dir...) for selected machine.
> How I can get the browser(Hards>dirs) for selected machine?
> Thanks in advance,
> Pola
>