|
There's nothing to deploy. You can either build the connection string at deployment time using custom actions, or, a more flexible option, is you have this is a setting in your application and you create a new connection string using a template, filling in the server name.
|
|
|
|
|
ok...you make it sound simple, but maybe i should clarify. I am really just getting the hang of database stuff so i don't know exactly how to do what you are telling me. As far as i know the connection string is in a setting, i just don't know how to set it properly to the computer it gets installed on, i figure i do it on form load, but how exactly would i go about it.
Here is the default connection string in settings:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PasswordManager.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True
Do you think you could be so kind as to explain it all to me please. Please if you could explain what i have to change and how.
|
|
|
|
|
If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The |DataDirectory| path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string.
So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the |DataDirectory| replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
Integrated Security=True;Connect Timeout=30;User Instance=True
|
|
|
|
|
i'm beginning to sound dumber and dumber here, but how do i put the database in the folder, through the deployment project or programmatically?
|
|
|
|
|
The deployment project. Right-click the Application Folder in the File System, pick Add, then Project Output. In the dialog that shows up, click on Content, then OK. Rebuild the solution.
|
|
|
|
|
Its all working now, thanks a heap for your help, i've learnt some valuable information. Thanks again.
P.S. I must say, as cynical as you sometimes seem, you are one of the most effective helpers on here and well and truly deserving of the MVP.
|
|
|
|
|
I tend to add a bunch of sarcasm to what I say, though I do get short with people who don't bother to help themselves. I'm definitely not saying that you're one of them.
|
|
|
|
|
Have a program in VB.Net 2003 that retrieves data from an access database. Now i have a project to do that must use Web Services Standards SOAP or WSDL etc. With the VB.Net 2003 and access database on either the client or server and then by the use of Web Services on the either client or server with different language Java,PHP,PERL,PYTHON etc retrieve the information from the VB.net forms that has retrieved the information from the access database by the easiest means possible. I was thinking of Java. But i am open to any ideas please.
|
|
|
|
|
Hi Kendo17
You are Explaining many things at the same time.le tme try to Understand this. Do you want Consume webservice from a Windows Application?,
Do you want to Access the data from the Webservice using your VB Presentation layer?
Take this simple road
Create your Data Access Layer,Business Layer and Presentation Layer. Query your data from a Form through a BLL, and a BLL will Query from DAL and a DAL will Query from an Actual Database.
i have an Article for that, but what you need to know that in your case
DAL will be your Webservice.
http://www.codeproject.com/useritems/N-Tier_Application.asp[^]
Thanks
Vuyiswa Maseko,
Wise Sayings are too Deep for a fool to understand, and when important matters are being discussed, they are not invited.
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Your question doesn't make any sense and is very confusing. I have no idea what you're trying to do, what you have written already, or even what the point of this Web Service is.
|
|
|
|
|
Sorry about the confusion Dave was just in a hurry last night. Thanks for your patience.
I must create a distributed application. It may serve any purpose, as long it is works. Small an complete is better than large and not complete work.
At the very least, it must provide a Web Service, and it must consume the same Web Service. The Web Service must be implemented using generally accepted Web Service standards, such as SOAP, WSDL, etc.
The portion of the application that provides the Web Service must be implemented using a different language, tool set, platform and/or development environment from the portion of the application that consumes the Web Service. For example, i might implement the Web Service in VB.NET, and the Web Service consumer (i.e., client) in PHP. I may not implement both in C#, or both in Java, or both in PHP. Furthermore, developing both under the .NET platform, though using different languages (such as C# and Visual Basic), is not acceptable. I must use significantly different platforms.
Some examples:
• Create a parallel computation application employing one or more Web services to solve a problem, such as determine a sequence of large prime numbers, decrypt a string, or use brute-force to guess a password.
• Create a Web service to act as a front-end for a SQL database, which will respond to arbitrary SQL queries.
|
|
|
|
|
OK. That straightens out the requirements parameters of the assignment. So what's the problem?
|
|
|
|
|
Just enquiring to see what is the best way to go about this and get a professional opinion. If possible some hints to where to start. I am going to try some tutorials online asap and got some books here as well. I am looking for info on the easiest way to set this up on my own of course.
|
|
|
|
|
Pick something for the Web Service to do, like a converter between metric and english units. Then pick a platform and language to write it in. Write the service.
Pick another language and platform to write a consumer app in that calls the Web Service. Write that.
Test, fix, rinse and repeat.
Other than that, I have no idea what you're asking. Where to start on what?? Writing the web service?? Or the consumer app?? Is it the language and/or platforms you don't know anything about?? How about starting with what the languages and platforms you DO know. Those would be ...??
|
|
|
|
|
I have done a little VB.net 2003 front end which retrieves data from access database back end some SQL, i know of JAVA, C# etc but never used them. But looks as if i am going to have to start.
I may employ third-party libraries or source code as part of your application, but the essential functionality – especially the Web Service, above – must be my own creation. Any third-party libraries or source code you use must be credited in comments within your source code, and in the report
|
|
|
|
|
OK. Then start with VB.NET writing the Web Service. Create a simple one first that just takes a number as an argument and returns the same number back.
You don't need a client app to write a web service. When you execute the service, it'll start up it's own web page you can use to test the service.
|
|
|
|
|
Thanks again Dave i have done a google ap wich is pretty cool just need to think what i can create on my own or add-on to something else.
|
|
|
|
|
I am writing a program in VB.NET. I am used to coding in PHP, but am writing a business systems program and figured it would be best to do it in VB.NET.
I am using the System.IO class to use BinaryReader and BinaryWriter to read and write my files.
What is the best way of doing this? I thought that I would use binary files so that noone can open my files and physically see the contents of them.
I want to store my data in data structures.
Here is an example of one of my data structures and a few questions.
1) Am I supposed to store binary data in a data structure?
2) Do I need to define the length of each string column in the data structure record?
3) Can I search the contents of the binary file (array?) by for an example name, column or line number?
For an example. I would like to be able to fill a list box collection with all the teacher names, meaning separating one of the column in the record from the rest.
Here is an example of my teacher structure.
Structure teachStruc<br />
Public intTeachID As Integer<br />
<VBFixedString(25)> Public strTeachName As String<br />
<VBFixedString(15)> Public strTeachPhone As String<br />
<VBFixedString(15)> Public strTeachCell As String<br />
<VBFixedString(128)> Public strTeachAdd As String<br />
<VBFixedString(5)> Public strTeachAptNum As String<br />
<VBFixedString(25)> Public strTeachCity As String<br />
<VBFixedString(3)> Public strTeachState As String<br />
Public intTeachZip As Integer<br />
Public dtTeachStartDate As Date<br />
<VBFixedString(128)> Public strTeachEmail As String<br />
<VBFixedString(128)> Public strTeachInst As String<br />
End Structure
|
|
|
|
|
AAGTHosting wrote: I thought that I would use binary files so that noone can open my files and physically see the contents of them.
Who told you that?? Writing a string to a binary file is not a form of encryption of protection for the files contents. You will still be able to see the string if you open the file in Notepad. It'll just be surrounds by a bunch of other junk that isn't so readily readable.
AAGTHosting wrote: 1) Am I supposed to store binary data in a data structure?
You could, but you don't have to.
AAGTHosting wrote: 2) Do I need to define the length of each string column in the data structure record?
Yep.
AAGTHosting wrote: 3) Can I search the contents of the binary file (array?) by for an example name, column or line number?
Nope. You'd have to read the file into a collection of records, then search the collection.
You're complicating things more than they should be. You could easily get away with doing this in an XML file. You could even encrypt the sensitive data and write the encrypted data to the file, only decrypting it when the file is read back into your app.
|
|
|
|
|
Binary means bytes. It doesn't matter if it's a string, or integer, it's just bytes.
You would need to define how the records are blocked - another words how many bytes to allocate to each field. For instance, strings would have to be padded with blanks.
IMO, you would do better using a database handler like SQL Express.
Otherwise you would have to do your own sorting / searching / marking for deletion, etc.
Naturally, if one used HexEdit, they could see the data and figure out the format and blocking.
|
|
|
|
|
Is SQL express free and can I package it with my program, like maybe have it also install during set up time?
|
|
|
|
|
Yes!
The Fanatical All Black Supporter - Kea Kaha
|
|
|
|
|
AAGTHosting wrote: ) Am I supposed to store binary data in a data structure?
Not the way that you are attempting.
A structure is usually used for types that represent a single value, not a data record. It's recommended that a structure shouldn't be larger than 16 bytes, your structure is three times that size. Also, your structure contains objects, which more or less defeats the purpose of a structure.
A structure can not be read or written directly to a file, which it sounds like you were planning to do. You have to write each and every property to the file.
When in doubt, use a class. If you want to create a structure, you should read up on how a structure works exactly.
AAGTHosting wrote: 2) Do I need to define the length of each string column in the data structure record?
No. If you write a string using a BinaryWriter, it stores the string length in the file.
AAGTHosting wrote: 3) Can I search the contents of the binary file (array?) by for an example name, column or line number?
No. You can read the records from the file and look for property values.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi
I am getting this message when I run the application
" 1004 : Unable to set the PrintGridlines property of the Pagesetup class".
This application is running fine in Production . I am in the process of taking over the application from a different developer and it works fine on his machine too.
My PC is connected to a Network Printer and am able to print anything from
my PC. Infact based on the some info from Microsoft website, I went and
installed the printer driver and it still did fix the problem.
The code where I am getting the problem is as follows
With xlSheet.PageSetup
.PrintGridlines = True
.CenterHorizontally = True
End With
Any help in this regard will be appreciated
Regards
RS
-- modified at 14:13 Wednesday 24th October, 2007
rs
|
|
|
|
|
So is this a Windows Forms app, or ASP.NET app?
|
|
|
|