|
You have been here long enough to have read the forum guidelines. Do not use words like 'urgent' or 'help' in your message titles.
______________________
stuff + cats = awesome
|
|
|
|
|
Yep. Shame on him
"That's no moon, it's a space station." - Obi-wan Kenobi
|
|
|
|
|
try to search on google
http://www.vbdotnetheaven.com/UploadFile/sushmita_kumari/Report201242006041121AM/Report2.aspx?ArticleID=d6184a33-ee75-495d-9ef3-1fe3e9a24632
http://www.crystaldevelopersjournal.com/artman/publish/article_132.shtml
may be these articles help u out
|
|
|
|
|
Thanks for your help,I see this link and i didn't found any diffrance between what i did and what wrote in this page, i want to know if that maybe VS setup error?
Thanks again
|
|
|
|
|
try to see this too
http://aspalliance.com/articleViewer.aspx?aId=265&pId=
|
|
|
|
|
Thanks for your help,I see this link and i didn't found any diffrance between what i did and what wrote in this page, i want to know if that maybe VS setup error?
Thanks again
|
|
|
|
|
Is it possible to include the IIS into a Windows service?
I would like to provide from my Windows Service also a Web Service Interface (maybe running on another port) that can use the objects in the Windows Service. I know that I could use .net remoting but I don't want to have another Interface, if it can be avoided.
Thanks and Greets
Roland
|
|
|
|
|
I don't understand. If you want an IIS hosted WebService why not just create one?
|
|
|
|
|
Maybe I have to explain a little bit better (or at least I try to...)
I have a windows service that starts when the server is started. This windows service does its job in the background, receives data, makes function calls etc. and is allways running as it should. The windows service makes some function calls through web services.
Now I want to create a web GUI that shows the state of the windows service, using asp.net, ajax etc. One way to get the data would be to communicate with the windows service through .net remoting. But as the other Interfaces are web services and therefor are easy to call for testing I would like to be able to receive the data from the windows service through a web service interface.
But to be able to provide the interface as an web service I need a web server inside my windows service (or at least I think it could work like that).
Hope my idea is now clearer.
Thanks and Greets
Roland
|
|
|
|
|
Roland Bär wrote: One way to get the data would be to communicate with the windows service through .net remoting. But as the other Interfaces are web services and therefor are easy to call for testing I would like to be able to receive the data from the windows service through a web service interface.
Doesn't Remoting have an HTTP channel that uses SOAP?
|
|
|
|
|
Hi, I have a ComboBox to which I give a string array as a DataSource. It works. I also have a DataSet and one of the columns of a table contains the SelectedIndex of this ComboBox, but when I bind it, it does not select the right index.
I've decided to bind it to a numericUpDown and it works, so what's going on with the comboBox?
Here's my code:
numericUpDown1.DataBindings.Add("Value", dataset.LoadModule, "RampUpSpeed");<br />
<br />
rampUpCombo.DataBindings.Add("SelectedIndex", dataset.LoadModule, "RampUpSpeed");
Thanks!
|
|
|
|
|
hey all,
I'm tring to pull records from an access database in my c#.net web app.
Doing it using VS2005 in the gui view is fine but I want to set up a connection server side and pull records using a reader like I would with sql, however, I can't seem to find the syntax. I have created the connection string but from there on it seems quite a bit different from an sqlconnection.
I'm after the equivilant of below:
//------
OleDbConnection dbConnect = new OleDbConnection(@"Dsn=MS Access Database;dbq=C:\Program Files\Sage\Accounts\DBFile.mdb;defaultdir=C:\Program Files\Sage\Accounts;driverid=25;fil=MS Access;maxbuffersize=2048;pagetimeout=5;uid=manager");
OleDbCommand dbcommandCom = new OleDbCommand(@"select * from [invoice]");
dbConnect.Open();
OleDbDataReader RecReader = null;
dbConnect.Open();
RecReader.Read();
dbConnect.Close();
//-----------
Can someone please help as I have a short timescale for the project.
Thanks in advance
mark
|
|
|
|
|
Basically, I believe you call Read over and over, and each time you do, the reader points to the next record, and you can access the columns of that row before calling read again.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It looks like you create a connection object, a command object and a reference for a data reader, and hope that they will automatically find each other, execute the command, create a data reader object and place in your reference. They don't. You have to make the command object use the connection, then you have to use a method in the command object like ExecuteReader to execute the command, and assign it's return value to your reference. Then you can start to read from it.
Look at any examples out there. They are everywhere.
markymark82 wrote: I have created the connection string but from there on it seems quite a bit different from an sqlconnection.
On the contrary. From there on the code is very similar.
---
single minded; short sighted; long gone;
|
|
|
|
|
ok,
so should I actually be using the 'OleDbConnection', as currently I keep getting errors about the provider for it, the only suggestion i've found is 'provider=sqloledb;' in the connection string, but obviously its not an sql db so that doesn't work, what would the equivilant be for an ms access db?
Otherwise the only other connection object I have found that does not error is:
'AccessDataSource db = new AccessDataSource(@"Dsn=MS Access Database;dbq=C:\Program Files\Sage\Accounts\ODBC.mdb;defaultdir=C:\Program Files\Sage\Accounts;driverid=25;fil=MS Access;maxbuffersize=2048;pagetimeout=5;uid=manager", @"select * from Invoice");'
but from there I have no idea how to open a reader as I can't find an option for it and I can't see how to read the records that are returned from it?
thanks for you help so far, much appreciated
mark
|
|
|
|
|
Open the properties for the connection that you are using in Visual Studio. There you will see the provider and connection string.
Otherwise connectionstrings.com[^] is good for connectionstrings.
OleDb is the preferred provider for Access.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks for the help,
I really appreciate it.
I shall try that outbut for now I have found a way slightly around the problem.
I have created a system odbc object that links to the .mdb file and then linked to it through odbcconnection. This has worked fine for now but I'll still try doing it the other way as i wont have to create odbc objects on each machine its to be installed on.
thanks again
mark
|
|
|
|
|
hi,
i've made an app on my pc who pings to see who's in my network and is able to send emails
i want to do the same on a pocket pc, but i cant seem to find how this works
i get stuck on the fackt that pocket pc in vs 2005 doesn't have :
using System.Net.NetworkInformation;
using System.Web.Mail;
does anybody know were i can find examples or how i send emails or ping ???
plz help!
grz muk
|
|
|
|
|
Hi,
i've created a setup project and it works fine. Now i want to retrieve the installation path because i need to set it as current directory for the windows service i've created. How can i do it?
I need to pass through windows registry (how?) or exists a variable or a property which i can read?
Thank you all!
Gianluca
|
|
|
|
|
[TARGETDIR] is the property which contains the installation directory.
You can add registry keys via the installer.
|
|
|
|
|
terrible83 wrote: because i need to set it as current directory for the windows service i've created
As someone pointed out in the past few days, best practice is to use absolute paths.
To obtain the path you can access the installation path using the Windows Installer SDK in your service, that is what you are asking correct? However AFAIK this should work:
System.Reflection.Assembly.GetExecutingAssembly().Location
|
|
|
|
|
Hi
Im doing an application in Visual C# 2005, my application can read data from my database but cant save into the database. Heres the code. What am I missing....Pliz Help!!!!
private void btnSave_Click(object sender, EventArgs e)
{
string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source=YAC.mdb";
OleDbConnection conn = new OleDbConnection(strConnection);
conn.Open();
string strCommand = "INSERT INTO ClientProfile(Name,Surname,Gender,IdNumber) Values ('" + txtName.Text + "','" + txtSurname.Text + "','" + cbxGender.Text + "','" + txtIdNumber.Text + "')";
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.InsertCommand = new OleDbCommand(strCommand, conn);
(this.yACDataSet.ClientProfile);
int t1 = adapter.InsertCommand.ExecuteNonQuery();
conn.Close();
if (t1 > 0)
{
MessageBox.Show("added successfully!");
}
csanda
|
|
|
|
|
|
I'm trying to query the registry on a remote server to verify a value. using the code
<br />
RegistryKey RemoteKey;<br />
string RemoteComputer = LabName + "isp0001";<br />
RemoteKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, RemoteComputer);<br />
string value = RemoteKey.OpenSubKey("SOFTWARE\\Twrap\\Packages\\Completed", RegistryKeyPermissionCheck.ReadSubTree).GetValue("1.3", 0).ToString();<br />
<br />
When i run it i see this:
A first chance exception of type 'System.NullReferenceException' occurred in LabMonitor.exe
A first chance exception of type 'System.NullReferenceException' occurred in LabMonitor.exe
and the exception message is: "Object reference not set to an instance of an object"
Please help 
|
|
|
|
|
StevenWalsh wrote: and the exception message is: "Object reference not set to an instance of an object"
You're bound to get that when you chain together calls without first checking the return values. I'd assume that OpenSubKey is failing, but you should step through and check it yourself, and write more defensive code in future.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|