The SQL Server Express Edition

Joined
Feb 21, 2018
Messages
216
Reaction score
86
Hi,
Using Microsoft SQL Server Management Studio, I am now able to create views. I also configured the firewall on my server and configured the workstations, Now I can access sql express server from workstations.

Now I got temptation to create a Hello-World-Sort of application in Visual Basic, and for this I need to get the license of SQL Express 2012 for embedding and deploying to workstations,... where can I find it "Free license for embedding & deploying 2012 SQL Express" ?
 
Last edited:

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
Joined
Feb 21, 2018
Messages
216
Reaction score
86
You don't need to obtain a license in order to embed and deploy SQL Express with your applications. If you are looking for the download link so that you can install it then I thought that was the link you posted on the very first post.

Here is a link to 2014: http://www.microsoft.com/en-us/download/details.aspx?id=42299
Thank you very much. I will try to develop a hello world sort of test application and will deploy it to workstations ...it will just run query/view and display the listing in an excel worksheet . any thoughts on this?
 

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
any thoughts on this?

So what type of app are you going to make? Windows Desktop Form? Excel VBA? Or a web app? I have different thoughts on each type. If you want something quick and fast I'd say writing the app in Excel VBA would be best. But if you want something with better language features, go for a C# Windows Forms app.
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
Hi,
Thank you very much for your input...
I have already used excel to connect to SQL Express...Now I have temptation of making use of visual studio 2010..But its too concised/abridged edition...it only offers business intelligence components as follows: The question is , using this can i develop an executable file which i install on workstations and that will run the queries and display the results (on the workstations) from SqlExpress Server.?
 

Attachments

  • upload_2018-4-2_11-7-35.png
    upload_2018-4-2_11-7-35.png
    293.3 KB · Views: 212
Joined
Feb 21, 2018
Messages
216
Reaction score
86
Thank you very much. I was going for c# installation but suddenly someone diverted me to visual studio community 2017 which includes all the useful stuff including c#.
Currently the setup is 93% downloads and installs side by side.

Lets see once its completes.. I will write my first c# application and deploy it to workstations .

Soon after that i would need your guidance /help to upgrade from sql express SP1 to SP2 making sure i don't lose my data.

I foresee that i will soon be given a hi-end server machine with latezt win server operating system...that will turn invoke data migration task too.
 
Last edited:
Joined
Feb 21, 2018
Messages
216
Reaction score
86
Hi.

I have managed to write my first csharp application . Its console application. I executes a query/view and lists down the records on cmd prompt console screen...
But the issue is...it runs successfully on my server/laptop but fails to execute from workstation/laptop...it displays an error saying the application has incorrect format...Can you please help?
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
On Run at workstation the error summary is as follows:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\server\....application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file://server/Users/.../.../.application: the manifest may not be valid or the file could not be opened.
+ manifest XML signature is not valid.
+ SignatureDescription could not be created for the signature algorithm supplied.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
...



WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [4/5/2018 9:08:56 AM] : Activation of \\server\SalesDues.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [4/5/2018 9:08:59 AM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file://server/Users/SalesDues.application: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
=- manifest XML signature is not valid.
=- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
=- SignatureDescription could not be created for the signature algorithm supplied.
=- Source: System.Security
- Stack trace:
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
I did two things to overcome the error condition.

first I went on this following link and followed the instructions therein...

https://stackoverflow.com/questions...-not-be-valid-or-the-file-could-not-be-opened


Next I installed dot-net framework 4.6.1 and rebooted the workstation....

Now the application is running properly...

My next mission is to focus on CSharp tutorials videos of Tim Corey ...he introduced me to a great utility called Dapper for Csharp+SQL development work.


Thanks & regards
Amjad
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
I have recently learned the use of stored procedures...

I have got two stored procedures both are identical in (inserting records) purpose. The only difference is the table names.... Using a WPF C# I am getting these tables updated (i.e simple insertion of records)...

please see the code segment...(can anybody identify what's wrong in the code when it says.... If V ?

public void insertBill(string CustName, string PO, string PODate, string SSCBill, string SSCBillDate, decimal AmountPKR)
{
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(Helper.CnnVal("SQLEXPRESSMASTERDB")))
{

List<Bill> Dues = new List<Bill>();
Dues.Add(new Bill { CustName = CustName, PO = PO , PODate = PODate , SSCBill = SSCBill , SSCBillDate=SSCBillDate , AmountPKR = AmountPKR });
string result = SSCBill.Substring(0, 3);


String SAL = SSCBill.Substring(0, 3);


string v = SAL = "SAL";
if v
{
connection.Execute("dbo.spDues_Insert @CustName, @PO, @PODate, @SCBill, @SCBillDate, @AmountPKR", Dues);
}
else
{
connection.Execute("dbo.spSrv_Dues_Insert @CustName, @PO, @PODate, @SCBill, @SCBillDate, @AmountPKR", Dues);
}

}
}
}
}
 

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
OK first I will need to know what the error message says exactly. But looking at the code I see two things wrong. Don't you need parenthesis around the V when using it in an if statement? Also, you don't declare the V variable before you are using it.
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
OK first I will need to know what the error message says exactly. But looking at the code I see two things wrong. Don't you need parenthesis around the V when using it in an if statement? Also, you don't declare the V variable before you are using it.
Yes exactly, it is saying syntax error '(' expected...
So my question is shall I start ( soon after if V( ? then where will I close it?
Please also let me know wether i declare it Public ?
 

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
Write it like this: if (V)
And also you have to declare the V as a Boolean so that is evaluates to true or false. But then you have to set the value using a statement. What are you attempting to do with V?
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
I got it simplified by doing ...if (SSCBill.Substring(0,3) == "SAL")

Its working!
Thank you.


By the way
Please allow me to ask kindergarden question:
why double equal signs ==, I mean how do I know when to use single = and when double == ?
 
Last edited:

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
A single equal sign is used when assigning a value to a variable, like so: string firstName = "Abraham";
A double equal sign is used when comparing values of two different variables, like so; bool isEqual = firstName == lastName;
:fool:
Hope this helps. If you need more info about all the operators available in C# then read this article: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
I am trying to restrict the textbox change event from firing...by the following command in the form_load event.
AmountPKRInsText.TextChanged -= AmountPKRInsText_TextChanged;

Is it OK to add it in form load event...?
Can it be added in the form.designer.cs?
 

Abraham Andres Luna

Child of God
Joined
Mar 14, 2018
Messages
699
Reaction score
227
Wow I've never seen anyone try to suppress an intrinsic event from firing, I don't even know if what you are doing is possible. Why would you want to stop that event from firing?
 
Joined
Feb 21, 2018
Messages
216
Reaction score
86
Wow I've never seen anyone try to suppress an intrinsic event from firing, I don't even know if what you are doing is possible. Why would you want to stop that event from firing?

I agree. I was just experimenting it…and it worked when I wrote that line of code in form load event.

Nevertheless, its not a good thing to adopt as a normal practice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top