|
This article at Business Objects[^] shows how to set the connection at runtime for vb.net.
|
|
|
|
|
while creating the dsn there is an error occuring.
Attempted to read or write memory . This is often an indication that other memory is corrupt.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CreateAccessDSN("Nilish", "d:\Database\dbase.mdb")
End Sub
Public Function CreateDSN(ByVal Driver As String, ByVal Attributes As _
String) As Boolean
CreateDSN = SQLConfigDataSource(0&, ODBC_ADD_SYS_DSN, _
Driver, Attributes)
End Function
Public Function CreateAccessDSN(ByVal DSNName As String, _
ByVal DatabaseFullPath As String) As Boolean
Dim sAttributes As String
If Dir(DatabaseFullPath) = "" Then Exit Function
sAttributes = "DSN=" & DSNName & " "
sAttributes += "DBQ=" & DatabaseFullPath & " "
CreateAccessDSN = CreateDSN("Microsoft Access Driver (*.mdb)", _
sAttributes)
End Function
|
|
|
|
|
Why are you even using a DSN in the first place? There's no reason for it anymore...
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
i have image files field in the database(MS-Access).
I wanted to display those images into the crystal reports.
How can i do it.
|
|
|
|
|
Hi!
I am facing some problem while reading from CSV file and updating database from the data available in csv file. My problem is that CSV files are too large having atleast 5000 rows and while updating database for each row I need to query database for atleast four times. It means I have to query the database for atleast 200,000 for a single file. This is retarding my application's processing speed and increasing load on machine as well as on database server. Please suggest me how to cope up with this problem?
Thanks and Regards,
Virendra
|
|
|
|
|
You should be using DTS (Data Transformation Services) for this, it would drastically bring down the time you would be spending in importing this data. The package can contain conditions and code to suit the business logic.
Have a look at these articles to get an idea about dts:
DTS VB .NET[^], DTS Export[^], Dynamic Creation of DTS Package[^]
|
|
|
|
|
Hi..
I have a textbox that was firing Text_changed event when the user press Enter.but now it is not firing any more.But the handler for this event is executed when a postback occur(for example when I click a button).
Could any one tell me how to solve this problem and make it working as before(when the user press Enter)?
I am too late but i will never give up
|
|
|
|
|
Please use ASP.NET forum as this is related to web
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Sorry I put it here by mistake.I will put it again in the asp.net forum.
I am too late but i will never give up
|
|
|
|
|
What have you changed that made it stop working?
The TextChanged event is a server event, so it can only fire during a postback.
When you press enter, it can either be caught by the focused control (if it is a textarea, a select or a button) or by the form. If the form catches it, it will act as if the first button in the form was clicked.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi..Happy to here from you again .
The only change I made it was putting the asp:textbox in a <DIV> instead of a <table><tr><td>.
I observed when I press enter in the textbox I hear a sound(one of the windows usual sounds).
I am too late but i will never give up
|
|
|
|
|
hi all,
how to fill a value to combo in datagridview
thanks
|
|
|
|
|
if u r asking for binding the combo box then here's the code
dim con as new oledbconnection("connsctionsting")
con.open
dim ds as new dataset
dim ad as new oledbdataadapter("query",con)
ad.fill(ds)
combobox1.displaymember="fieldname"
combobox1.valuemember="fieldname"
combobox1.datasource=ds.tables(0)
|
|
|
|
|
Select Datagridview. Now Click on smart tag which is on top Right corner then select Option "Edit Column".Now select the column from selected column list which is of combo box type. Now Select Property Items(collection Type) and Press the associated button button.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
I'm not sure if this will answer your question, but the following code segment first creates a DataTable containing values for my combo box, then creates a column that is inserted into a datagrid.
Dim typeDesc As New DataTable
Dim dr As DataRow
typeDesc.Columns.Add("Indx", Type.GetType("System.Int32")) '0
typeDesc.Columns.Add("Desc", Type.GetType("System.String")) '1
dr = typeDesc.NewRow()
dr(0) = 0 : dr(1) = "Rural"
typeDesc.Rows.Add(dr)
dr = typeDesc.NewRow()
dr(0) = 1 : dr(1) = "Suburban"
typeDesc.Rows.Add(dr)
dr = typeDesc.NewRow()
dr(0) = 2 : dr(1) = "Urban"
typeDesc.Rows.Add(dr) ' datatable giving values type
newCol = New DataGridViewComboBoxColumn
newCol.Width = 90
newCol.HeaderText = "Parcel Type"
newCol.DataSource = typeDesc
newCol.ValueMember = "Indx"
newCol.DisplayMember = "Desc"
dgvTasks.Columns.Insert(2, newCol)
The dgvTasks is the name of the datagrid in which the combo will appear.
Rich Feldman
|
|
|
|
|
thanks a lot Rich Feldman... your code is very help me to solve my problem...
|
|
|
|
|
I have created leave management system in vb.net i want to use outlook in dot net,how to link it
shs
|
|
|
|
|
System.Diagnostics.Process.Start("mailto:youremailadress.yahoo.com")
|
|
|
|
|
hi,
use following code
pass required argument to following function
Function MailComponent(ByVal mailTo As String, ByVal cc As String, ByVal Bcc As String, ByVal subject As String,byval bodyofMessage as string)
Dim str, body As String
str = ""
If bodyofMessage Is Nothing Then
body = bodyofMessage
End If
If cc Is Nothing Then
cc = ""
End If
If Bcc Is Nothing Then
Bcc = ""
End If
If subject Is Nothing Then
subject = ""
End If
'string builder used for concatination
Dim MsgBuilder As New System.Text.StringBuilder
MsgBuilder.Append("mailto:" & mailTo)
If Not cc.Trim = "" Then
MsgBuilder.Append("&cc=" & cc)
End If
If Not Bcc.Trim = "" Then
MsgBuilder.Append("&bcc=" & Bcc)
End If
If Not subject.Trim = "" Then
MsgBuilder.Append("&subject=" & subject)
End If
If Not Body.Trim = "" Then
MsgBuilder.Append("&body=" & Body)
End If
If Not Attachment.Trim = "" Then
MsgBuilder.Append("&Attach=" & Attachment)
End If
'Debug.WriteLine(MsgBuilder.ToString)
ExecuteFile(MsgBuilder.ToString)
End Function
Function ExecuteFile(ByVal FileName As String) As Boolean
Dim myProcess As New Process
myProcess.StartInfo.FileName = FileName
myProcess.StartInfo.UseShellExecute = True
myProcess.StartInfo.RedirectStandardOutput = False
myProcess.Start()
myProcess.Dispose()
End Function
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
There's not enough information in your question to answer it. What do you want to do with Outlook?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Please tell me how to connect from VB to Ms Exel
|
|
|
|
|
|
Dear freinds i need help how by coding we can perform working as minimize and maximize button perform. for maximize and minimize window form.
suhail shahab
|
|
|
|
|
The form has a WindowState property.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Me.WindowState = FormWindowState.Minimized
Me.WindowState = FormWindowState.Maximized
Chatura Dilan
|
|
|
|