|
You'll need a 3rd party library just to get started. Something like WinPcap[^]. Get the latest Development Pack, under the Development tab on the left, and it'll come with the documentation for the library.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir/Madam,
Can I programically find out whether the particular table exist in the database or not.
Thanks abd Regards
|
|
|
|
|
i think u can try it by just using try-catch and query like
select * from tablename
if u end up in catch then u are sure table not present else table may be present.
i think this helps
enjoy..
|
|
|
|
|
Use the following query to get the list of all User tables in SQL Server connecting to a particular DB
select * from dbo.sysobjects where OBJECTPROPERTY(id, N'IsUserTable') = 1
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Yes, you can programmatically find out whether the table exists or not, but, you need to provide more details:
what type of database?
what type of table?
|
|
|
|
|
Sir/Madam,
Can I programically find out whether the particular table exist in the database or not.
Thanks abd Regards
|
|
|
|
|
I start programming by VB.NET 2005.
I create a project by vb.net and build it to exe and moved the file(windows application1.exe)to another computer that not installed Visual studio 2005 on it.sofar my program not running in this computer.
i want understand that i must completly installing Microsoft Framework.net 2.
are there a simple way?
please help me and mailing me:mahyar_bbc@yahoo.com
|
|
|
|
|
yes you need to install .net 2.0 framework for any .net appln to run there is no other way to escape
enjoy..
|
|
|
|
|
You must install the .NET Framework 2.0 in order for your app to work. You do NOT have to install Visual Studio .NET, just the .NET Framework. You can download the redistributable from here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How to get File's contents the txt and Doc files. so pls some one help me...
thanking you
somasundaram
|
|
|
|
|
Reading a text file is easy. There's an example here.[^]
Reading a DOC file (I'm assuming you're referring to a Word document) is not so easy. You have to use Word to open it for you. Don't even think of trying to read it directly yourself. I don't do Office Interop, so I don't have any examples to show you, but, you may want to take a look at this[^] before you start looking for an example of opening a document.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want to get the .txt and .Doc files. but i wrote the code only displaying the txt file.But it wont display the .Doc files.
I select the Doc and txt fileNames in Listbox.but File's Contents has to display in Richtextbox.
so I've written the code for(.txt) files only.But i need (.Doc) file's contents also.So How to get the (.Doc files Contents).So pls some one Help me......
Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged
Dim myFile As System.IO.FileInfo
Dim fileInfo As String
Dim myFileName As String
Dim stream As StreamReader
Dim input As String
myFileName = ListBox3.SelectedItem.ToString
myFile = New System.IO.FileInfo(fileName:=myFileName)
fileInfo = myFileName.Length.ToString
stream = File.OpenText(myFileName)
input = stream.ReadLine()
Console.WriteLine(input)
RichTextBox1.Text = input
stream.Close()
End Sub
Thanking you
somasundarak
|
|
|
|
|
somagunasekaran wrote: But it wont display the .Doc files.
Of course note. The RichTextBox doesn't know anything about Word's file format.
somagunasekaran wrote: But i need (.Doc) file's contents also
You can get the text from a Word document using Office automation (Interop). But, if there is anything other than normal text in it, like tables and graphics, they won't show up in the RTB or won't show correctly.
Office automation is not something I do, so I don't have any examples to give you. But, this[^] should be a good place to start.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Private Sub BPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BPrint.Click<br />
Dim frm As New FrmPrintReport 'reports<br />
Dim cr As New CRepResponsable<br />
cr.SetParameterValue(0, Val(Me.TBAccountNumber.Text))'integer<br />
cr.SetParameterValue(1, Me.TBAccountNumber.Text)'string<br />
cr.SetParameterValue(2, vbNull) 'integer<br />
cr.SetParameterValue(3, vbNull) 'string<br />
<br />
frm.CrystalReportViewer.ReportSource = cr<br />
frm.MdiParent = Me.MdiParent<br />
frm.Show()<br />
End Sub
i have the code above. i could not pass a null parameter, to the crystal reports. i will have an empty report i tried vbnull.null and vbnull.empty same result.
but if I put
cr.SetParameterValue(2, Val(Me.TBSubAccount.Text))) 'integer 'not null<br />
cr.SetParameterValue(3, Me.TBSubAccount.Text) 'string 'not null
the report display the values.
here is the select expert formula (CR):
{CUSTOMERS.SUB_ACCOUNT_NUMBER} = {?SubAccount_String} and<br />
{ecole.serial} = {?AccountNumber} and<br />
{CUSTOMERS.ACCOUNT_NUMBER} = {?AccountNumber_String} and<br />
{ecole.sub_account} = {?SubAccount}
How could i pass a null parameter?
Regards
Ramy
|
|
|
|
|
hi ,
wish u happy new year.
i have created a setup and installed the console appln in a diffent system .Everything is working except a form which has report viewer to display output.i think i have Not follwed the procedure to create setup for applns which have reports properly.the error which is dispaly when i try to display the report using report viewer in the application is
"System.Runtime.Interopservices.com exception
(0x80040154):com object wutg cksud{...} is either not valid or not register
at crystal desicions.crystal reports.ReportDocument.[]=()
-do- .Internalinit()
-do- .ctor()
at projname.projname..ctor
at projname.frmname.btn10_click()
any suggestion is welcome...
thank you for ur time and help in advance..
enjoy..
|
|
|
|
|
Did you include in your install, or at least install seperately, Crystal Reports?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have created a rich text box using CreateWindowEx API. How do I send print of a document in the control using API or otherwise?
|
|
|
|
|
Are you sure this is a Visual Basic question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Function RchEdtCreate(ByVal hWindow As Long, ByVal ExtendedStyle As Long, ByVal Style As Long, ByVal Text As String, ByVal xPos As Long, ByVal yPos As Long, ByVal width As Long, ByVal height As Long, ByVal hInstance As Long) As Long
LoadLibrary "riched20.dll"
Const RICHEDIT_CLASS$ = "RichEdit20A"
RchEdtCreate = CreateWindowEx(ExtendedStyle, RICHEDIT_CLASS, Text, Style, xPos, yPos, width, height, hWindow, 0, hInstance, ByVal 0&)
'RichTextWndClass, Richedit_Class, RichEdit20A
End Function
This is my Code.
|
|
|
|
|
In fact, it is plain C.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Okay Thanx,If u know the answer send it to me in any language.
|
|
|
|
|
You can use the Printer object.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Could u pls send me the source code?
|
|
|
|
|
I haven't, anyway, using the Printer object is fairly simple.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I was aware of this possibility, what I don't get is, why would you do it this way ? How does this create a different object to the one in the VB toolbox ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|