Visual Basic .NET 2005 Express && Sql Server 2005 Express Remote Server
Mar 12, 2007
Hi,
I want to make a component library in Visual Basic.NET and connect to a remote Sql Server. When I create a new DataSet with the wizard, I can only connect to a .mdf file, but not to a Sql Server. With Visual Web Developer I can connect to a Sql server. What is the difference between these enviroments ? How can I do the same with Visual Basic.NET ?
Thanks in advance.
View 1 Replies
ADVERTISEMENT
Sep 13, 2006
HiIm trying to connect Visual Basic Express 2005 to a remote SQL Server Express 2005. I cant find how i can do that in VB.net Express.In Web developer there are no problem to connect to a remote SQL server but i cant find it in VB.net Express. The XP with the SQL server that i want to connect to is on the local network. Greatful for help!
View 1 Replies
View Related
Jun 13, 2007
Hi Guys,
I created a Product database table using Visual Basic 2005 Express and SQL Server 2005 Express. I have just added a new column [Picture] to the database table, which of course, should store an image or picture of a product. I am writing to kindly ask you guys for help .
i) How do I include image files into this column [Picture]?
ii) How do I get this image to display on Visual Basic 2005 Express form, so that when a product is selected the product image is displayed accordingly?
Your help much appreciated. Thanks.
Paul
View 8 Replies
View Related
Oct 8, 2007
Hi, i am new to sql server and visual basic, i need to connect my sql server database to a new application i've developed in visual basic 2005 express. Can any one tell me the steps to do this. Many Thanks.
View 2 Replies
View Related
Aug 18, 2006
This problem only occurs after deployment, not when debugging. In the table I am having a problem with I have an ID field designated as the primary key with the identity increment set to 1 and the identity seed set to 1. There is no data in the table when deployed. I can add records to the datagridview control but when I try updating the dataset I get this error indicating that the ID field already has a value of 1 present. If I close the application and re-start it, the exception no longer occurrs when I update the dataset. I am including the code to update the tables incase something is wrong there. Any suggestions?
Private Sub UpdateMemberTable()
Me.Validate()
Me.TblMembersBindingSource.EndEdit()
Me.TblMembersTableAdapter.Update(Me.ChurchFamilyDataSet.tblMembers)
Me.TblMemberDependentsBindingSource.EndEdit()
Me.TblMemberDependentsTableAdapter.Update(Me.ChurchFamilyDataSet.tblMemberDependents)
Me.TblMemberContributionsBindingSource.EndEdit()
Me.TblMemberContributionsTableAdapter.Update(Me.ChurchFamilyDataSet.tblMemberContributions)
End Sub
View 3 Replies
View Related
Dec 1, 2006
Hello..
I've installed Visual Basic 2005 express edition & tried to connect to SQL Server 2005 express edition. I noticed that VB2005 Express Edition doesn't have any OLEDB provider for SQL Server. The only OLEDB Provider is for M.Access. Is this correct? if so, what should i do if i want to connect SQL Server 2005 express edition with VB2005 express edition by using OLEDB connection type?
I really appreciate any respond from you guys.. Thank's and waiting for the good news..
Best regards,
VITRELLE
View 1 Replies
View Related
Aug 8, 2006
When I installed VS 2005, it installed the default version of SQL Server 2005 Express that ships with Visual Studio 2005 installer media.
How can apply SQL Server 2005 Express SP1 to update this existing instance?
Currently, if I run this query:
SELECT @@version
I get the following:
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
After applying SP1, I should get 9.00.2047.00.
Should I just go to this link and download & install the SQL Server 2005 Express Edition SP1:
http://msdn.microsoft.com/vstudio/express/sql/download/
Thank you,
Bashman
View 11 Replies
View Related
Apr 11, 2006
I've downloaded and installed both of these (VWD installs both) and have been trying to run through the walkthrough of setting up a web application which supports membership. However, no matter what I do I invariably get errors like the following:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
I'm concerned why VWD and VSQL express versions don't run correctly out of the box (so to speak). I'm not an expert on configuring these services -- but that's the point of offering these tools to hobbyists: So we can learn about how to make some of these great applications using MS tools.
My configuration::
Windows XP SP2 -- clean machine as of about a month ago, never had any dev tools, web servers, or the like on it.
IIS is installed and the service says its running
VSQL and VWD express versions installed (no errors on installation)
SQL server service indicates it is running
.Net 2.0 framework installed (no errors on installation)
Note: I've tried installing on two separate machines. Obviously I'm missing something fundamental.
Would someone please help me go through the million things I [apparently] need to do to configure all these tools so I can get on to actually coding up my first web application? If this is documented somewhere, all I can say is I tried to find it but it certainly wasn't obvious.
View 3 Replies
View Related
Jul 10, 2007
Hello,
Iam new to Visual basic 2005, I have installed SQL Express and prefers to use ADODB to connect to the database.
This is the code i tried
con.Open(cstring1 = "Provider=SQLNCLI.1;" _
& "Server=(local);" _
& "Database=D:VS 2005 ProjectsMyDB.mdf;" _
& "Integrated Security=SSPI;" _
& "DataTypeCompatibility=80;" _
& "Data Source=server1sqlexpress")
The error is comexception was unhandled,
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Can anyone help me out.
I have SQLExpress installed and Visual studio 2005 installed.
Connection string for ADODB ??
Regards,
Sathyan
View 4 Replies
View Related
Nov 21, 2007
Hi all, I have a var called sEP which contains a number. The problem I have is calling that var during an SQL query within Visual Basic. To test the update string I wrote the following query and simply told it to enter the text "Five Stars" on the row which contains the entry '1' in Episode Number column. It works fine. UPDATE JackBennySET Rating= 'Five Stars'
WHERE ([Episode Number]= '1') But how do I replace the '1' in the query with the var sEP (which will contain the actual number I want the query to run against)?I have tried various suggestions from sources including:UPDATE JackBenny SET Rating = 'Five Stars' WHERE [Episode Number] = '" + sEp + "'However, they all fail to update the database at all which makes me think the syntax is incorrect.Any help is very appreciated (I have been seeking help in various places for 2 days now) - I always send small paypal tips to people who help me on forums.
View 4 Replies
View Related
May 9, 2006
yiotis writes "Is there a way where you can programmatically (via visual basic) replicate two or more SQL Express databases located on multiple computers without the need of SQL Server 2005 acting as a publisher. From what i understand this is a limitation in SQL Express.
Right now i have SQL Express installed on 2 machines. I am able via vb to communicate with each database, read and write data between databases but cannot seem to figure out how to perform a simple replication.
Bottom line is, i need to be able to replicate via vb code 2 sql express databases with each other.
Thanks"
View 1 Replies
View Related
Jun 24, 2007
I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me
View 3 Replies
View Related
May 27, 2007
Hi,
I'm a complete novice concerning SQL Server (Express Edition)
I'm trying to Add or Delete rows froma VB 2005 Express Function or Sub. While the program is running everything is ok. Except when restarted added records are gone and deleted records are back.
Have i missed an option during installation?
Thx,
Steven
View 5 Replies
View Related
May 20, 2006
I have installed Visual Web Developer Express and its companion SQL Server 2005 Express in my Windows XP Professional box.
Now I want to create a database using Visual Web Developer. I opened the Database Explorer and right clicked on Data Connections icon but what I am seeing is an inactive "Create new database" command.
How can I make it active ? How to create a database using my Visual Web Developer?
View 3 Replies
View Related
Aug 22, 2007
Hi all,
I have SQL Server Express and VB 2005 Express installed in a Microsoft Windows XP Pro PC that is a terminal PC in our office Network. My Network Administrator has granted my terminal PC for Administrator Use. I tried to do the ADO.NET 2.0-VB 2005 programming in my terminal PC and I could not get a remote connection in the Window Form Application via Window Authorization. I do not know how to make this kind of remote connection in my Network. Please help and advise.
Thanks in advance,
Scott Chang
View 6 Replies
View Related
Feb 22, 2008
(1) I have already installed of SQL Server 2005 Developer Edition first.
(1) Can I install visual studio 2008 without the 2005 express edition of SQL server? Will be any problems because I don't have express edition of SQL server? Do I need to install the express edition of SQL server as well?
(3) How to use SQL Server 2005 Developer Edition instance on visual studio 2008?
View 3 Replies
View Related
Sep 19, 2007
Hi all,
In my office computer network system (LAN), my Windows XP Pro PC has SQL Server Express and VB 2005 Express installed and I was granted to have the Administrator priviledge to access SQL Server Express. I tried to create a SQLCLR project in my terminal PC.
1) I tried to set up a remote connection to SQL Server Express in the following way: SQL Server EXpress => SQL Server Surface Area Configuration. In the Surface Area Configuration for Service and Connection - local, I clicked on Remote Connection of Database Engine, SQLEXPRESS and I had a "dot" on "Local and remote connections" and "Using TCP/IP only". Then I clicked on "Apply" and "OK" buttons. Then I went to restart my database engine in SQL Server Management. When I went to check SQL Server 2005 Surface Area Configuration, I saw the arrow is pointing to "Service", not to "Remote Connections"!!!??? Is it right/normal? Please comment on this matter and tell me how I can have "Remote Connecton" on after I selected it.
2) After I restarted the database engine (I guess!!), I executed the following project code (copied from a book) in my VB 2005 Express:
//////////////--Form9.vb---/////////////////
mports System.Data.SqlClient
Imports System.Data
Public Class Form9
Dim cnn1 As New SqlConnection
Private Sub Form5_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Compute top-level project folder and use it as a prefix for
'the primary data file
Dim int1 As Integer = InStr(My.Application.Info.DirectoryPath, "bin")
Dim strPath As String = Microsoft.VisualBasic.Left(My.Application.Info.DirectoryPath, int1 - 1)
Dim pdbfph As String = strPath & "northwnd.mdf"
Dim cst As String = "Data Source=.sqlexpress;" & _
"Integrated Security=SSPI;" & _
"AttachDBFileName=" & pdbfph
cnn1.ConnectionString = cst
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Create a command to create a table
Dim cmd1 As New SqlCommand
cmd1.CommandText = "CREATE TABLE FromExcel (" & _
"FirstName nvarchar(15), " & _
"LastName nvarchar(20), " & _
"PersonID int Not Null)"
cmd1.Connection = cnn1
'Invoke the command
Try
cnn1.Open()
cmd1.ExecuteNonQuery()
MessageBox.Show("Command succeeded.", "Outcome", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
cnn1.Close()
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Create a command to drop a table
Dim cmd1 As New SqlCommand
cmd1.CommandText = "DROP TABLE FromExcel"
cmd1.Connection = cnn1
'Invoke the command
Try
cnn1.Open()
cmd1.ExecuteNonQuery()
MessageBox.Show("Command succeeded.", "Outcome", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
cnn1.Close()
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Declare FromExcel Data Table and RowForExcel DataRow
Dim FromExcel As New DataTable
Dim RowForExcel As DataRow
FromExcel.Columns.Add("FirstName", GetType(SqlTypes.SqlString))
FromExcel.Columns.Add("LastName", GetType(SqlTypes.SqlString))
FromExcel.Columns.Add("PersonID", GetType(SqlTypes.SqlInt32))
'Create TextFieldParser for CSV file from spreadsheet
Dim crd1 As Microsoft.VisualBasic.FileIO.TextFieldParser
Dim strPath As String = _
Microsoft.VisualBasic.Left( _
My.Application.Info.DirectoryPath, _
InStr(My.Application.Info.DirectoryPath, "bin") - 1)
crd1 = My.Computer.FileSystem.OpenTextFieldParser _
(My.Computer.FileSystem.CombinePath(strPath, "Book1.csv"))
crd1.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
crd1.Delimiters = New String() {","}
'Loop through rows of CSV file and populate
'RowForExcel DataRow for adding to FromExcel
'Rows collection
Dim currentRow As String()
Do Until crd1.EndOfData
Try
currentRow = crd1.ReadFields()
Dim currentField As String
Dim int1 As Integer = 1
RowForExcel = FromExcel.NewRow
For Each currentField In currentRow
Select Case int1
Case 1
RowForExcel("FirstName") = currentField
Case 2
RowForExcel("LastName") = currentField
Case 3
RowForExcel("PersonID") = CInt(currentField)
End Select
int1 += 1
Next
int1 = 1
FromExcel.Rows.Add(RowForExcel)
RowForExcel = FromExcel.NewRow
Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
MsgBox("Line " & ex.Message & _
"is not valid and will be skipped.")
End Try
Loop
'Invoke the WriteToServer method fo the sqc1 SqlBulkCopy
'object to populate FromExcel table in the database with
'the FromExcel DataTable in the project
Try
cnn1.Open()
Using sqc1 As SqlBulkCopy = New SqlBulkCopy(cnn1)
sqc1.DestinationTableName = "dbo.FromExcel"
sqc1.WriteToServer(FromExcel)
End Using
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
cnn1.Close()
End Try
'Read the FromExcel table and display results in
'a message box
Dim strQuery As String = "SELECT * " & _
"FROM dbo.FromExcel "
Dim str1 As String = ""
Dim cmd1 As New SqlCommand(strQuery, cnn1)
cnn1.Open()
Dim rdr1 As SqlDataReader
rdr1 = cmd1.ExecuteReader()
Try
While rdr1.Read()
str1 += rdr1.GetString(0) & ", " & _
rdr1.GetString(1) & ", " & _
rdr1.GetSqlInt32(2).ToString & ControlChars.CrLf
End While
Finally
rdr1.Close()
cnn1.Close()
End Try
MessageBox.Show(str1, "FromExcel")
End Sub
End Class
//////////////////////////////////////////////////////////////////////////////
I got the following error messages:
SecurityException was unhandled
Request for the permission of type 'System. Security. Permissions.FileIOPermission,mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'failed that is pointing to the code statement "Dim int1 As Integer = InStr (My.Application.Info.DirectoryPath, "bin")."
Troubleshooting tips:
Store application data in isolated storage.
When deploying an Office solution, check to make sure you have fulfilled all necessary requirments.
Use a certificate to obtain the required permission(s).
If an assembly implementing the custom security references other assemblies, add the referenced assemblies to the full trust assembly list.
Get general help for the exception.
I am a new Microsoft VS.NET Express user to do the SQL Server 2005 Express and VB 2005 Express programming by using the example of a tutorial book. Please help and tell me what is wrong in my SQLCLR sep-up and project coding and how to correct the problems.
Many Thanks in advance,
Scott Chang
View 3 Replies
View Related
Jul 18, 2006
Hello, I would like to know if anyone here has any information on how to change the default version of SQL Server 2005 Express which ships with Visual Studio 2005 to the new SQL 2005 Express SERVICE PACK 1?
I see a file under disc:vswcuSSESQLEXPR.exe I am wondering if changing that file with the new one from Microsoft Download Center will do it...
There's another file under that folder named sqlexpr32.exe I am wondering what it's for?
Thanks in advance.
View 1 Replies
View Related
Jul 18, 2006
Hello, I would like to know if anyone here has any information on how to change the default version of SQL Server 2005 Express which ships with Visual Studio 2005 to the new SQL 2005 Express SERVICE PACK 1?
I see a file under disc:vswcuSSESQLEXPR.exe I am wondering if changing that file with the new one from Microsoft Download Center will do it...
There's another file under that folder named sqlexpr32.exe I am wondering what it's for?
Thanks in advance.
View 2 Replies
View Related
May 26, 2008
Hi,
I have VS Pro 2005 and SQL Server Express 2005 installed on an XP Pro machine. When using VS 2005, in the 'Server Explorer' window I can see and attach to two SQL Server databases that I have set-up. But if I attempt to access the same databases from withn the 'Solution Explorer' window I get the following dialog box message,
"
Required Component Missing (Dialog box heading)
Connections to SQL Server Files (*.mdf) require SQL Server Express to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
"
I have uninstalled and then reinstalled both VS 2005 and SQL Server Express twice but it has helped.
I don't understand why I'm getting this error because all of the server configuration tools and connection utilities seem to work fine but VS say's that SQL Server Express is not installed.
Thanks,
CLN
P.S.
I had another application that required MSDE 2000A to be installed. When I removed the other application I also removed MSDE 2000A and that's when the problem began.
View 3 Replies
View Related
Feb 15, 2008
Hi there,
Anyone know how I can replace (or download) the sqlexpr32.exe bootstrap package with the advanced services SP2 edition of SQL 2005 express ?
Pieter
View 9 Replies
View Related
May 10, 2006
The program shortcut "Visual Studio 2005 Command Prompt" seems to be mising from the "Visual Studio 2005 Command Prompt" Start menu added by the current Microsoft SQL Server 2005 Express Edition Toolkit. Where is it? How to workaround?
I am trying to do Download details SQL Server 2005 Samples and Sample Databases (April 2006) -> GettingStartedWithSQLSamples.htm which says "a. Open a Microsoft Visual Studio 2005 command prompt. Click Start, point to All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt." but I can find no such command prompt within "Visual Studio Tools", only "Visual Studio 2005 Remote Debugger{, Configuration Wizard}".
What's wrong? How to fix or workaround? I'd install .NET SDK 2.0 to get it's Command Prompt but that's about 570MB merely for a command prompt!
Thanks for your help, -Mike Parker
View 1 Replies
View Related
Jul 9, 2006
Hi everyone,I am trying to connect to SQL Server 2005 Express with Advanced Services from Visual Studio 2005 Standard Edition. I have SQL Server 2005 Standard Edition but it took up so much space and resources on my computer that I didn't want to put it back on there. So I put the SQL Express on there and while the Management Studio application connects just fine, VS 2005 will not. Oddly enough, VS 2005 connected just fine to SQL 2005 Standard. I have enabled shared memory, named pipes and TCP/IP. I have set up SQL Express to accept remote connections on named pipes and TCP/IP. And I have tried running SQL Express as the Local System Account, as a Local Service and as a Network Service. Nothing. I have tried feeding the Server Name is the Data Connections dialog in Visual Studio my SQL Express instance as (local)/SQLEXPRESS, localhost/SQLEXPRESS, and {computername}/SQLEXPRESS where {computername} is the name of my local computer which SQL Express is (allegedly) running on. And I cannot get the list of databases on that server.There is probably something very simple that I have left out. Can anyone see what it is?Thanks!
View 2 Replies
View Related
Dec 5, 2007
Hello
I'm having a problem with the server connection and my C# code. The code executes alright but no data is entered into the database behind it. I'm pasting the connection code over here as well. The sql commands are used in the code. I think I used the sql server mobile edition which is installed along with visual studio.net 2005. Anyone know what's wrong, and can help me out? Thanks in advance.public static void storeInDb(string trackName, string artist, string albumTitle, string year, string path, uint[] fp)
{
string connStr="Data Source=.\SQLEXPRESS;AttachDbFilename='"+path+"\Data\ACI.mdf';Integrated Security=True;User Instance=True";SqlConnection conn = new SqlConnection(connStr);
conn.Open();string sql = "INSERT INTO Clip(Song, Artist, Album, Year) VALUES('" + trackName;sql = sql + "','" + artist + "','" + albumTitle + "','" + year + "')";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
sql="SELECT max(ClipID) FROM Clip";
cmd = new SqlCommand(sql, conn);int id = Int32.Parse(cmd.ExecuteScalar().ToString());for (int i = 0; i < fp.Length; i++)
{
sql="INSERT INTO Hash VALUES ("+id+","+(i+1)+","+(int)fp[i]+")";cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
}
conn.Close();
}
View 1 Replies
View Related
Sep 29, 2006
I had SQL Server Express Edition installed. I then uninstalled both it and Visual C#. I then installed SQL Server 2005 Developer's Edition and reinstalled Visual C# -- both on the same machine. I can connect to SQL Server 2005 using SQL Server Management Studio. However, Visual C# is a different story. When I try to add a new Data Connection, it defaults the data source to .SQLEXPRESS, which is no longer on my machine. I can select .MSSQLSERVER, but when I click on either OK or Test Connection, I time out with an error message -- error 25 - Connection string is not valid. The connection string that is shown at the bottom of the Advanced dialog box is -- Data Source=.MSSQLSERVER;AttachDbFilename=E:InventoryDataInventory_Data.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True
View 12 Replies
View Related
Jan 23, 2008
Hi Jonathan Kehayias, Thanks for your valuable response.
I had a hard time to sumbit my reply in that original thread yesterday. So I created this new thread.
Here is my response to the last code/instruction you gave me:
I corrected a small mistake (on Integrated Security-SSPI and executed the last code you gave me.
I got the following debug error message:
1) A Box appeared and said: String or binary data would be truncated.
The statement has been terminated.
|OK|
2) After I clicked on the |OK| button, the following message appeared:
This "SqlException was unhandled
String or binary data would be truncated.
The statement has been terminated."
is pointing to the "Throw" code statement in the middle of
.......................................
Catch ex As Exception
MessageBox.Show(ex.Message)
Throw
Finally
..........
Please help and advise how to correct this problem in my project that is executed in my VB 2005 Express-SQL Server Management Studio Express PC.
Thanks,
Scott Chang
The code of my Form1.vb is listed below:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form1
Public Sub InsertNewFriend()
Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=shcDB;Integrated Security=SSPI;"
Dim connection As SqlConnection = New SqlConnection(connectionString)
Try
connection.Open()
Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("@procPersonID", SqlDbType.Int).Value = 7
command.Parameters.Add("@procFirstName", SqlDbType.NVarChar).Value = "Craig"
command.Parameters.Add("@procLastName", SqlDbType.NVarChar).Value = "Utley"
command.Parameters.Add("@procAddress", SqlDbType.NVarChar).Value = "5577 Baltimore Ave"
command.Parameters.Add("@procCity", SqlDbType.NVarChar).Value = "Ellicott City"
command.Parameters.Add("@procState", SqlDbType.NVarChar).Value = "MD"
command.Parameters.Add("@procZipCode", SqlDbType.NVarChar).Value = "21045"
command.Parameters.Add("@procEmail", SqlDbType.NVarChar).Value = "CraigUtley@yahoo.com"
Dim resulting As String = command.ExecuteNonQuery
MessageBox.Show("Row inserted: " + resulting)
Catch ex As Exception
MessageBox.Show(ex.Message)
Throw
Finally
connection.Close()
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InsertNewFriend()
End Sub
End Class
View 6 Replies
View Related
Aug 12, 2007
Hi,
I am developing an application for pocket pc 2003 smart device which utilizes synchronization between SQL CE 2005 and SQL server 2005 by means of REMOTE DATA ACCESS method call PULL( ) and PUSH( ) but currently these are the details of the error Im encountering when PULL( ) method is called:
Error code: -2147467259
Descripion: An error occured on the computer running IIS.Restart the IIS server.
Minor error: 28022
Source: SQL server CE
Currently Im developing this application as a final project and due to some limitations I have setup my pc to act as the SQL server and the IIS server both on the same machine.
Any help will be appreciated, thanks.
View 5 Replies
View Related
Jun 11, 2006
I've installed SQL server 2005 Express and set up a database called StockData. I'm running the following code in a visual C# windows app to test the connection:
System.Data.Sql.SqlDataSourceEnumerator instance = System.Data.Sql.SqlDataSourceEnumerator.Instance;
DataTable tblSource = instance.GetDataSources();
string strSource = tblSource.Rows[0][0].ToString() + "/" + tblSource.Rows[0][1].ToString();
SqlConnection sqlConn = new SqlConnection();
sqlConn.ConnectionString = "Data Source=(local);Initial Catalog=StockData;Integrated Security=true";
sqlConn.Open();
I have verified that the SQLEXPRESS service is up and running. The strSource variable shows the machine and SQLEXPRESS instance name when I step through, so I know that the application is recognizing the service. But when I get to the "sqlConn.Open()" line, I get the following error message:
Message="An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Can anyone tell me what I'm doing wrong here? This is driving me nuts. Thanks.
View 1 Replies
View Related
Feb 20, 2008
Hi,
I would be very grateful if someone could take a look at my command line install and offer advice on if I am doing it correctly.
The reason I am asking is because I cannot seem to get the server installed without having errors during the installation:
"The SQL Server (MSSQLSERVER) service terminated with service-specific error 17113 (0x42D9)"
Looking at the server error log indicates that master.mdf was not in the data directory (I have however specified a different data directory for ease of backup by our software and this is created during the install but does not have this database in the data directory - it is however in the template data directory!
I also get this error when the SQL Server service is started:
"The SQL Server (SQLEXPRESS) service terminated with service-specific error 3417 (0xD59)."
All advice is welcome. Please see below my batch file. Also, if you think I should do this in a different way then please let me know. I basically want to install SQL server on a customer computer and automate the install so the custoemr does not need to enter any information.
The goal of this install is:
[1] Deply a custom .Net application and SQL server at the same time on the same computer without user input.
[2] Allow remote .Net applications (designed by myself also) to connect over a LAN (and later maybe over a WAN) to the database to the above database.
The command line is this (I have also included the batch file I am usign below). For ease of reading I have put the parameters on a new line below:
setup.exe /qb
username="CustomerUsername"
companyname="OurCompany"
addlocal="SQL_Engine,SQL_Data_Files,SQL_Replication,Connectivity,SDK"
disablenetworkprotocols="0"
instancename="MSSQLSERVER"
INSTALLSQLDATADIR="c:SqlData"
USESYSDB="c:SqlData"
SAVESYSDB="1"
SQLAUTOSTART="1"
SECURITYMODE="SQL"
SAPWD="#StrongPaSSword#"
======= Batch file Start ======
SET MODE=/qb
SET SETUP_EXE=sqlfilessetup.exe %MODE%
SET SQLDATADIR=c:SqlData
SET SET_USERNAME=username="CustomerUsername"
SET SET_COMPANYNAME=companyname="OurCompany"
SET SET_ADDLOCAL=addlocal="SQL_Engine,SQL_Data_Files,SQL_Replication,Connectivity,SDK"
SET SET_DISABLENETWORKPROTOCOLS=disablenetworkprotocols="0"
SET SET_INSTANCENAME=instancename="MSSQLSERVER"
SET SET_INSTALLSQLDATADIR=INSTALLSQLDATADIR="%SQLDATADIR%"
SET SET_SAVESYSDB=SAVESYSDB="1"
SET SET_USESYSDB=USESYSDB="%SQLDATADIR%"
SET SET_SQLAUTOSTART=SQLAUTOSTART="1"
SET SET_SECURITYMODE=SECURITYMODE="SQL"
@REM === RE-INSTALL PARAMS - NOT CURRENTLY BEING USED?? SHOULD I ADD THESE ALSO? ===
SET SET_REINSTALLMODE=REINSTALLMODE="omus"
SET SET_REINSTALL=REINSTALL="SQL_Engine,SQL_Data_Files,SQL_Replication,Connectivity,SDK"
SET SET_REBUILDDATABASE=REBUILDDATABASE="1"
SET SET_SAPWD=SAPWD="#StrongPaSSword#"
@REM === START THE SETUP / RE-INSTALL ===
START %SETUP_EXE% %SET_USERNAME% %SET_COMPANYNAME% %SET_ADDLOCAL% %SET_DISABLENETWORKPROTOCOLS% %SET_INSTANCENAME% %SET_INSTALLSQLDATADIR% %SET_USESYSDB% %SET_SAVESYSDB% %SET_SQLAUTOSTART% %SET_SECURITYMODE% %SET_SAPWD%
======= Batch file End ======
Your advice is kindly welcome.
Thank you
Kind regards
Paul
View 2 Replies
View Related
Jan 18, 2008
Hello Everyone,
I have just installed then above softwares and I am trying to work on a very simple application.On my Default.aspx I created a Gridview and connected it to the dabase.Everything works fine?When I try to work on the Security under Website->ASP.NET_Configuration I get the error:
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store. The following message may help in diagnosing the problem: Unable to connect to SQL Server database. I see that a lot of people get this problem. Can someone sugest a way out?Thnaks in advancePati2005
View 3 Replies
View Related
Jul 16, 2007
Hi, is it possible to use SQL server express 2005 with visual studio 2003?
i've some problems...
Thanks
View 4 Replies
View Related
Jun 29, 2007
I work for a school district and our business lab is looking at using Visual Studio.net and since MSDE is being replaced by SQL Server Express 2005, will that work with Visual Studio.net for creating applications.
Thanks ahead of time.
View 1 Replies
View Related
Feb 7, 2008
Alright I'm using Visual Studio 2005 with SP1 and SQL Server Express 2005. I've downloaded all the updates on Windows Update. I'm joining a project late and trying to get the C#/SQL web-app up and running. My project manager has it built with Visual Studio 2005 pro and a full blown corporate license for the SQL server, but I don't have access to the SQL server quite yet.
When I try to open the "LLRCWEB.sln" file I receive the following error:
"The application for project 'C:Documents and Settings......LLRCSQL.dbp' is not installed.
Make sure the application for the project type (.dbp) is installed."
Has anyone encountered this problem before? Are there any plug-ins or particular application versions you know are required to handle '.dbp' files, or will I have to Install Visual Studio 2005 Pro and get access to the SQL server?
Any input would be greatly appreciated
View 1 Replies
View Related