Create new row and database record SQL
Please help, I have created a database called MoToGP in my project and have tested the connection successfully, when creating a new record via button_click event the attached connection error appears, why? :-( Please help...
CrishPosted Nov 30, 2010, 4:34 AM
You can use this below link to solve the problem of Create new row and database record in SQL.
http://www.w3schools.com/SQL/sql_insert.asp
Sam HobbsPosted Nov 28, 2010, 1:02 PM
For me, the three services you describe are the same for me. The browser I think is just for other computers for connecting to your system, and it is a security risk to run it so Microsoft does not want you to use the browser unless you are sure you must use it and are aware of the risks. I also am unable to start the Agent, so I assume that is normal.
The repair failed, right? So it likely found the problem, or at least a relevant symptom. It said that a file cannot be copied. It says that is an error. I see that you have both SQL Server 20008 and SQL Server2005 in your system; at least pieces. So perhaps a piece of 2005 is interfering with 2008. I don't know; that is only a guess. Can you uninstall SQL Server 2005? If you can and then do a repair of 2008 then I hope that willl fix the problem.
Gerhard van der MerwePosted Nov 28, 2010, 3:02 AM
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
This above message appears whith Microsoft SQL Server Database File, NORTHWIND.MDF with Shippers Table.I have SQL Server 2008 R2 installed and SQLEXPRESS(SQL Server 10.50.1600) is running.
Additional info: When I right click on NORTHWIND.MDF in VS Server Explorer and select "Modify Connection" and then click "Test Connection" , the message "Test Connection succeeded" appears. In VS (Visual Studio) I am able to view all tables and records in NORTHWIND.DMF. When I compile the project and I run code to add records or rows the above error message (in italic) appears.
Some useless information: The same error message appears if I compile the same project with Compact 3.5. Also, not sure if the following info is relevant, but in SQL Server 2008 R2 - "Configuration Tools" - "SQL Server Configuration Manager" - There are 3 items in the window, the first item SQL Server (SQLEXPRESS) state = "running", start mode = "Automatic". The second item is SQL Server Agent (SQLEXPRESS) state = "stopped", start mode = "other(boot...)". The third item is SQL Server Browser with state = "stopped", start mode = "Other(boot...)". There is nothing I can do to get the last two item state to "running" they don't want to run, and never have. When I try to change the start mode property in the service tab for these two items from "disabled" to "automatic" or even "manual" the following error message appears: "The request is not supported[0x80070032]"
I ran repair on SQL 2008 R2 with the following error result:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2058354685
Exit facility code: 1360
Exit error code: 3
Exit message: Failed: see details below
Start time: 2010-11-28 10:36:17
End time: 2010-11-28 10:44:19
Requested action: Repair
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20101128_103532\Detail.txt
Exception help link: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.1600.1%26EvtType%3d0x9B4E9E2B%400x24776C0D
Machine Properties:
Machine name: GERRY
Machine processor count: 2
OS version: Windows XP
OS service pack: Service Pack 3
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered
Sql Server 2005 Tools 1033 Express Edition 9.3.4035 No
Sql Server 2005 ToolsClient 1033 Express Edition 9.3.4035 No
Sql Server 2005 ToolsClient\Connectivity 1033 Express Edition 9.3.4035 No
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Database Engine Services 1033 Express Edition 10.50.1600.1 No
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS SQL Server Replication 1033 Express Edition 10.50.1600.1 No
Sql Server 2008 R2 Management Tools - Basic 1033 Express Edition 10.50.1600.1 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: c:\52707db9f2a54df2175481\x86\setup\
Installation edition: EXPRESS_ADVANCED
User Input Settings:
ACTION: Repair
AGTDOMAINGROUP:
AGTSVCACCOUNT: NT AUTHORITY\NETWORKSERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASCONFIGDIR: Config
ASDOMAINGROUP:
ASSVCACCOUNT:
ASSVCPASSWORD: *****
CONFIGURATIONFILE:
ENU: True
FAILOVERCLUSTERGROUP:
FAILOVERCLUSTERNETWORKNAME:
FARMACCOUNT:
FARMADMINPORT: 0
FARMPASSWORD: *****
FTSVCACCOUNT:
FTSVCPASSWORD: *****
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
PASSPHRASE: *****
QUIET: False
QUIETSIMPLE: False
SQLDOMAINGROUP:
SQLSVCACCOUNT:
SQLSVCPASSWORD: *****
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20101128_103532\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xF3BD8FD8@1360@3
Configuration error description: File c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\DllTmp32\sqlagentctr100.dll could not be copied to file path C:\WINDOWS\system32\perf-MSSQL10_50.SQLEXPRESS-sqlagtctr.dll.
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20101128_103532\Detail.txt
Feature: SQL Client Connectivity
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Writer
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Browser
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xF3BD8FD8@1360@3
Configuration error description: File c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\DllTmp32\sqlagentctr100.dll could not be copied to file path C:\WINDOWS\system32\perf-MSSQL10_50.SQLEXPRESS-sqlagtctr.dll.
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20101128_103532\Detail.txt
Feature: SQL Compact Edition Tools
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Compact Edition Runtime
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: Management Tools - Basic
Status: Passed
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20101128_103532\SystemConfigurationCheck_Report.htm
Sam HobbsPosted Nov 27, 2010, 4:11 PM
Gerhard van der MerwePosted Nov 27, 2010, 8:00 AM
metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlServerCe.3.5;provider connection string="Data Source=C:\GERHARD\ITTC\SQL\MyDatabase#1.sdf"
Data Source=C:\GERHARD\ITTC\SQL\MyDatabase#1.sdf
Zoran HorvatPosted Nov 27, 2010, 7:43 AM
Your program cannot connect to SQL server because machine itself is inaccessible, or SQL server is configured so that it doesn't allow remote connections. Connecting didn't come to a phase of sending credentials; even more, connection was not actively refused by SQL server. Another possibility is that firewall is blocking connections, but I can't say without connection string.
Gerhard van der MerwePosted Nov 27, 2010, 7:06 AM
Zoran HorvatPosted Nov 27, 2010, 4:19 AM