|
Sunil G wrote: I want 70-536 dumps.
You must have a huge backyard. Are you trying to grow vegetables in large quantities?
|
|
|
|
|
Hi,
I am trying to register the managed COM into HKEY_CURRENT_USER\Software\Classes key programmatically. But I cannot use RegAsm.exe tool or RegistrationServices class as both will register the COM into HKEY_CLASSES_ROOT(I guess) which I dont want to do it.
Is there any other class to do so? Any idea how to achieve this?
|
|
|
|
|
Message Closed
modified 23-Nov-14 6:54am.
|
|
|
|
|
Hi,
Yes. This is managed COM DLL. This is Automation Add-in and has to be registered so that I can execute the UDFs in Excel. We can register this using RegAsm.exe or RegistrationServices class progrmmatically. I want to register this COM dll into HKEY_CURRENT_USER\Software\Classes. How do I do it programmatically?
|
|
|
|
|
There is nothing called managed COM. Get your basics right.
|
|
|
|
|
ok ... it is managed DLL.
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data.Odbc;
using System.Data.Common;
using System.Data;
using System.IO;
namespace sample27
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("values get inserted");
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
}
}
class v
{
public static void main(string[] args)
{
string name = null;
string pwd = null;
int i=0;
string connstr = "/*connection string*/"
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
StreamReader sr = new StreamReader(@"e:\v.txt");
string query = "insert into samplereg(username,password) values(@username,@password)";
name= sr.ReadLine();
while (name != null)
{
i++;
SqlCommand cmd = new SqlCommand(query, conn);
cmd.Parameters.Add("@username", name);//error
cmd.Parameters.Add("@password", pwd );
cmd.ExecuteNonQuery();
name = sr.ReadLine();
conn.Close();
}
}
}
}
error:Add(string parametername,object value) has been depricated.use Addwithvalue(String parametername,object value)
modified on Wednesday, January 27, 2010 6:54 AM
|
|
|
|
|
Not exactly sure what you are trying to do, (but it does sound like "PLZZ SEND CODEZ").
Please clarify, and tell us what you have tried.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
vidhulibra wrote: if we wanna store user inputs(consider name and password in login form)into the table,wat v should code
If you are reallying being asked to store passwords, you need to be sufficiently experienced to understand the security implications. Anyone that experienced shouldn't be asking a question like this.
vidhulibra wrote: wat v should code?(c#)
It in the FAQs, people on these message boards aren't here to provide you with code. Let us know what you have tried, what went wrong and the people will help.
vidhulibra wrote: Waiting for reply.........
Now you have it
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
hi all.
<br />
private void SendMessage(string str)<br />
{<br />
byte[] message = Encoding.Unicode.GetBytes(str);<br />
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);<br />
IPAddress ip = IPAddress.Parse("224.0.0.1");<br />
try<br />
{<br />
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(ip));<br />
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 5);<br />
}<br />
catch (Exception e)<br />
{<br />
this.Text = e.Message;<br />
}<br />
IPEndPoint ipep = new IPEndPoint(ip, 7758);<br />
s.Connect(ipep);<br />
s.Send(message, message.Length, SocketFlags.None);<br />
s.Close();<br />
<br />
}<br />
<br />
private void RecMessage()<br />
{<br />
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);<br />
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 7758);<br />
s.Bind(ipep);<br />
IPAddress ip = IPAddress.Parse("224.0.0.1");<br />
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(ip, IPAddress.Any));<br />
while (true)<br />
{<br />
byte[] b = new byte[1024];<br />
s.Receive(b);<br />
string str = System.Text.Encoding.ASCII.GetString(b, 0, b.Length);<br />
this.Text = str;<br />
}<br />
s.Close();<br />
}<br />
|
|
|
|
|
Firstly, always use the "code block" widget to p[reserve your formatting - it makes it all more readable, rather than "inline code", and check via the "Preview" button.
Place a breakpoint at the line "this.Text = e.Message", and examine the exception - it should tell you what the problem is. ex.ToString() will also show you more information than ex.Message.
If that doesn't sort it, we need more information.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Thank you!
i used "e.toString()" and then
the Message is
"
System.Net.Sockets.SocketException: Provides an invalid parameter
at System.Net.Sockets.Socket.setMulticastOption(SocketOptionName optionName, MulticastOption MR)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue)
at WindowsApplication1.Form1.SendMessage(String str) 位置 C:\Documents and Settings\Administrator\桌面\MulitCase\WindowsApplication1\Form1.cs:行号 32
"
Sorry I'm from China .so English is not very well.
I hope you Can Unstand me
|
|
|
|
|
Your English is a lot better than my Chinese, trust me!
The third line in your error message
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue) indicates that the problem is with one of the two lines:
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(ip));
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 5); which makes sense, since they are the only lines in the try block.
Put a breakpoint on teh first one, then run the program to until the breakpoint occurs.
Single step through, until the exception happens, and you will know which line is causing the problem.
I would guess it is either the "new MulticastOption(ip)" or the "5" on the next line that is causing the problem, but we need to know which.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Hello,
I want to print report(crystal report) from dot matrix printer(for exp oki microline 5520). I can print, but it is very slowly and very noisy. I want to print for text format. What can i do?
I think ,i use visual studio in c#. i can write code for print configuration.
But, I do not know how to do, so i do not know codes. Can u help me?
Thanks.
|
|
|
|
|
koncuk wrote: but it is very slowly and very noisy
They always have been and always will be.
koncuk wrote: I think ,i use visual studio in c#. i can write code for print configuration.
Whatever you are trying to acheive, the printer will still be slow and noisy. Thats because of the way they work.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
To add to what Ashfield says, dot matrix printers have a set of eight or so not-very-little hammers with physically hit the paper through an inky ribbon. As a result, they are:
1) Slow - the hammers need to be physically pushed and pulled into place.
2) Noisy - the hammers have to hit fairly hard to make a mark.
Where the heck did you get a working DM printer? Not to mention spares such as ribbons!
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
No, you don't know. i get dot matrix printer for accounting departmant. Dot matrix printer noisy writes that 's right. But i use other program. this program use dot matrix printer, it is not noisy and slowly. I researched,it is possible to found by write code. But , i dont know this codes.
Thanks..
|
|
|
|
|
|
Thanks, but, not possible with c #? Maybe c# codes.
|
|
|
|
|
But possible to what?
Fast? Don't use Crystal Report as it prints as "image"
Noisy? It's hardware related it's not controlled by software, but it can be controlled by letting the printer impacting the paper less.
|
|
|
|
|
Output your report as text file and then print them.
|
|
|
|
|
I researched. I found the following link
http://support.microsoft.com/?kbid=322091
http://msdn.microsoft.com/en-us/library/dd162959%28VS.85%29.aspx
I think, it will work.
Thanks.
|
|
|
|
|
i think this answer may be help you.For dotmatrix printer u can write this way.create textfile and print what ever you want(content).
Code:
Step1:
using system.io;
streamwriter sw=new streamwrite("c:\text.txt");
sw.writeline("content");
sw.close();
step2:
* create another one file(DOS) with extension(.bat)
* here u should configure your printing setting(file path,printer portname)
syntax
type+(space)+filepath+">"+printerportname(or)printername
Code:
using system.io;
streamwriter sw=new streamwrite("c:\PrinterSet.bat");
sw.writeline("type c:\text.txt >com1");
sw.close();
step3
call printerSet.bat file,then print your content in printer
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName="c:\PrinterSet.bat";
proc.Start();
Regards
S.Murugesan,Software Engineer,Gratiff Solutions & Systems
|
|
|
|
|
|
There is a Job board here at CP. Use that.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|