|
Thanks, I just tried it again myself and got another error message"-- line 3 col 8: invalid TypeDecl"
That is the converter that I was using yesterday.
Anyway the conversion that you posted is something that I can work with. Thanks again.
|
|
|
|
|
I would like to develop a simple application to connect to a free version of sql server i.e. sql server 2005 express.
Question:
1-
Does sql server 2005 express have the same window i.e object explorer, management studio window as the other version of sql servers i.e. enterprise. i.e. where one can create a database, table, stored procedures, run queries...?
2-
Is it just one .exe or should I install other files too so that I can work with it as I do with the sql server management studio?
3-
For the connectionstring, should there be .mdf in th estring or just connection to the machine name with the sql server express installed? see below:
Data Source=myServername\SQLEXPRESS;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;
Thanks
|
|
|
|
|
1) Yes it has a Management "window". Try SQL 2008 R2 express. lots added, file size limit 10GB...
2) It should be one big exe or a msi or ....
3) depends. the second use requires the SQLExpress to be installed on each machine. Better use access in that case.
The first one allows multiple clients to contect to the same server, and use sql a a db server. There's a catch though.
As far as I know the Express version uses just one CPU even if you have 8(cores or pysical).
All the best,
Dan
|
|
|
|
|
I have always used sql server in large scales.
So, since this is a small project and the client may end up getting the paid sql server version in th efuture, may be it is best if I develop the c# application against the sql server 2008 express ?
|
|
|
|
|
Yep. But warn the clients. That if the user base gets big they must upgrade/buy the full SQL Server.
All the best,
Dan
|
|
|
|
|
MDL=>Moshu wrote: Better use access in that case.
Wash your mouth out with soap.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
Too expensive for me!
Joke aside I mean it.
It's faster, lighter. Many pros for using it as a single user or local db vs sql.
SQL Lite is another one bettern suited for local dbs.
All the best,
Dan
|
|
|
|
|
MDL=>Moshu wrote: Many pros for using it as a single user or local db vs sql.
The one thing that kills it for me is the non standard SQL.
The advantages to me of SQL Lite, SQLExpress and Compact is the ability to use SQL that will still work if your app gets scaled to a full Server situation.
Although if you are only using Access VBA it is perfectly fine.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
Henry Minute wrote: non standard SQL
There is no such thing like a "standard" SQL - the "S" in "SQL" is supposed to mean "structured". There are lots of differences between different database types, and the differences in SQL between Microsoft SQL Server and Access are really small.
|
|
|
|
|
SQL Server 2005 Express Edition is free to download, has no time limits, and is freely redistributable (with registration). With a database size limit of 4 gigabytes (GB) and support for 1 CPU and up to 1 GB of RAM, SQL Server 2005 Express Edition is suitable for application embedding or lightweight application development.
1. It can support following products along with it.
* SQL Server Management Studio Express
* SQL Server Configuration Manager
* SQL Server Surface Area Configuration tool
* SQL Server Business Intelligence Development Studio.
but, remember database size is limited to 4GB.
2.
You have to install SQLEXPR.EXE[^]
for SQL Server Express Edition.
You may install SQLEXPR_TOOLKIT.EXE[^]
for sql server toolkit, which includes:
-SQL Server 2005 Management Studio Express Edition
-Business Intelligence Development Studio (BIDS)
3.
First option is just find. we do not mention db filename, unless we attach it to project and is inside project.
Hope this helps
|
|
|
|
|
Hi,
Thanks for the reply guys...
In regards to below:
"3.
First option is just find. we do not mention db filename, unless we attach it to project and is inside project."
Please elaborate. I remember seeing somewhere where in a project the name of the sql express was placed inside the connectionstring. Also I remember seeing that .mdf was being used within the application.
Since this is a small project with one user to begin with (Number of users may increase to say 5 maximum in the future), should I place the mdf inside the project?
Thanks
|
|
|
|
|
A typical connection string where the database is already attached to SQL Server 2008 Express.
"Data Source=POWERPC\\SQLEXPRESS2008;Initial Catalog=Northwind;Integrated Security=True"
and where it is not already attached
"Data Source=.\\SQLEXPRESS2008;AttachDbFilename=E:\\SQLExpress\\NorthWind\\NORTHWND.MDF;Integrated Security=True;User Instance=True"
Basically the Express versions of SQL Server are the same as the full version, same engine etc., it's just that some of the tools and functionality have been disabled.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
Hi,
I am unable to connect to the sql2005express on my laptop
The error I get is:
login failed for user 'UserA'. the user is not associated with a trusted sql server connection
Note that sql server is set for both windows and sql authentication modes.
UserA is created in the login to have access to the database "DBName"
Data Source=.\SQLEXPRESS;Initial Catalog=DBname;User Id=UserA;Password=password
If I use the following connectionstring then it works fine
Data Source=LAPTOPName;Initial Catalog=DBname;IntegratedSecurity=True
Question:
How can I connect successfully to sqlExpress in my laptop please?
Thanks
|
|
|
|
|
At least you are able to connect using Windows Authentication.
The only time that I have seen the error message you are getting is when I have not had SQL Server Authentication turned on, even though I thought it was. So I can only suggest that you double check this, perhaps by following the steps in the post from yeukwong999 in this[^] thread on MSDN.
Once you are sure that it is turned on, if it still fails then I am stumped. In that case I suggest that you raise a new question, which will be seen by more people than will see this thread.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!
|
|
|
|
|
another thing to keep in mind is that Microsoft wants you to sign a distribution agreement with them if you are making a product that installs SQL Server Express. If this is something that the end user installs separately, then I think you would not have to have a signed agreement, but if you are building a system with it included, you should. We have signed it with MS for our application at work.
Steve Maier
|
|
|
|
|
Hi,
I want to restrict users that are logged on a computer from a guest account from running my .NET C# application. What is the recommended way to do this?
Best Regards
Olof
|
|
|
|
|
|
1st screen: Login form
initially, i.e for the 1st time it sud take username n password as admin admin n log in.
2nd screen: configuration.
here i have a data grid which will display all the values entered from form 3( add new user screen). i have 4 buttons in this screen. 1.add new user, 2.delete user,3.modify user,4.ok. Data grid will have 2 columns(user name, access level)
*new user button click- form 3(add new user screen ) ll be displayed. here there ll be three text boxes. one for user name, one for password, one for access level.. the user ll unser these details n press ok button in form3. on ok button click, only the user name n access level sub be displayed in the data grid.. but user name, access level n password sud be parallely saved in an array or arraylist.. here the no of users sud be restricted..
*for deleting the user, any row in the datagrid sud be selected n delete button ll be clicked. this deleting the user sud delete the data from the arraylist also.
*to modify the user details, first some row in datagrid sud be selected n on modify user button click, new form, form 4(i.e modify user form ll be displayed). here there will be 5 textboxes. old user name, new user name, old password, new password, confirm password. the old user name sud take the value from the grid when the form4 is displayed. on enetering the other details, the user name in the datagrid, will be modified n displayed with the new user name enetered by the user. along with this, the arraylist also sud be updated..
Note: each time the the user name is enetered from for3 n form4, first it sud be checked in the arraylist for the duplicate.. then the data that is displayed in the datagrid sud be retained..i.e when the application is restarted, the values previously entered sud be displayed in the arraylist.
*on ok button click in form2(configuration form), the array list sud be saved in am xml file.. for 2nd time login, the xml sud be checked for the existance of the user name. if the user name is present in the xml, then the user sud be allowed to log in..
database,datasource sud not be used. pls anyone help me to solve this prob
|
|
|
|
|
Please don't cross post you have already posted this question there[^].
|
|
|
|
|
Hi All,
I have requirement by which,:
when i press Ctrl+C on an outlook item, it gets copied to clipboard. I have to use this clipboard content and get MSG file(which is now text-data to clipboard), to C# outlook item and use it (say eg: save on some location as file).
if (Clipboard.ContainsText(System.Windows.Forms.TextDataFormat.Text))
{
IDataObject myData = Clipboard.GetDataObject();
Outlook.MailItem olMsg = (Outlook.MailItem)myData.GetData(DataFormats.Text, true);
}
Above code does not work because outlook is showing copied message as Text and not FileDropList!
Thus above code fails. What is other way to do so or modifications in same.
Your help highly appreciated.
|
|
|
|
|
I am currently working on a project, which will dynamically load in a C++ library and instantiate one of the contained classes through the use of a common interface.
However, one of the methods that I am trying to expose in the C++ library takes the following set of arguments...
C++Library.MethodName(String^ stringVariable, unsigned char sProblemVariable[])
This is where the problem arises.
Now I know the C# equivalent of the unsigned char [] argument is a byte, so I am attempting to use this method in the following manner.
byte[] byteArr = new byte[127];
unsafe
{
fixed (byte *bytePointer = byteArr)
{
int returnValue = Interface.MethodName(aStringVariable, bytePointer);
}
}
So I am attempting to expose the C++Library.MethodName through the Interface, using the following method signature...
unsafe int MethodName(string stringVariable, byte *problemVariable);
When compiling the C++ Library, implementing the interface, it builds successfully so I assume that the C++ method signature satisfies the C# interface signature.
However, when I attempt to load the C++ Library, I get a Reflection Exception telling me there is no implementation for the MethodName method, in the Library.
Any help would be greatly appreciated!!
Thanks..
A girl in Engineering AND IT?!...what is this nonsense?
|
|
|
|
|
Is there a reason you can't refactor the C++ code to .Net/C#?
What is the exact exception message?
Can you show us the interface you're creating (just the method prototypes will be sufficient).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I was trying to use PInvoke, as it provides another level of abstraction in a system that really doesn't need any more.
A generated C# code block dynamically loads the C++ dll through an interface loaded dynamically...and so on..
Anyway, I have resolved the issue by wrapping the C++ methods which take the unsigned char argument in methods which can be easily exposed through the interface.
Thanks for your input.
A girl in Engineering AND IT?!...what is this nonsense?
|
|
|
|
|
Did you consider wrapping the code in managed C++? I've done that occasionally in the past and had a lot of success with it.
|
|
|
|
|
Is there a reason you can't pinvoke this method? If you intend to write to the unsigned char [], you can pass a StringBuilder in to the method and use the output from that.
|
|
|
|