Click here to Skip to main content
15,896,453 members

Comments by Member 14898617 (Top 23 by date)

Member 14898617 17-Jan-21 0:01am View    
hi thank you so much for your answer , now i am getting below error:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ''object' does not contain a definition for 'get_Range''


at the line :
Excel.Range r = excelApp.get_Range(activeworksheet.Cells[i, 1]);


i searched and tweaked some lines but no use, please help me.
Member 14898617 15-Jan-21 8:24am View    
hi thank you your response ..i am creating VSTO for excel so i have no other options..could you please help me with the solution
Member 14898617 23-Dec-20 5:31am View    
sorry for being less clear in the question ..let me explain further so that you can help me ..

I have installed SQLEXPRESS in my system and built an app (winforms) in visual studio by creating a database in my sqlserver.

Now my application is complete , i have to install my app on my client(4-5 pc) all or on the same LAN and after installation when the user is trying to connect to my database located in my system he is getting below error:

System.Data.SqlClient.SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)

By searching online , i followed below points:

I have enabled Remote connection in my SSMS

I have TCP/IP in sql server configuration manager

I have created rule in firewall to allow port 1433

i then restarted sql server configuration manager

But when i opened TCP/IP window of Protocols of SQLEXPRESS in my sql server configuration manager , at the bottom TCP dynamic port was 12345(filled with other number) and my TCP port was empty.

I gain changed the TCP port to 1433 and cleared the number in TCP dynamic port and restarted SQL server services.

After all this when i reinstall the app in my client system i am getting the same error again , so please guide me if i am missing anything. And how to deploy winform Make Application With Database Can Access in Many Computers?
Member 14898617 21-Dec-20 2:37am View    
hi. Thank you for your suggestion i found out that the error is coming at the line: ```lotNoTextBox.Text = cmd.ExecuteScalar().ToString();``` as the "coilnotext" box and lot number was not matched , but again i have used try block right? ..it must show the exception in messagebox and let me use my application , but why it stepping out of the application itself?
Member 14898617 18-Dec-20 5:45am View    
Thank you so much ..