|
your answer will be a big help
thanks
|
|
|
|
|
Articles always have more info in them than forum replies.
http://www.codeproject.com/KB/cs/tsnewlib.aspx[^]
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I can't figure out how to add, edit and delete records in my database. whenever I try to add a new user to the database, this message comes out:
The 'Microsoft.Jet.OLEBD.4.0' provider is not registered on the local machine.
.ExecuteNonQuery() won't work..
I read that if your using datasets you don't need to use executeNonQuery.. But I don't know how to use datasets yet i have 'em..
this is the code i did for one adding records. PLease help me figure out what's wrong. I don't know if i have to change my settings on my pc or something's wrong with the code i did..
Imports System.Data.OleDb
Public Class frmUsers
Dim dbCon As New OleDbConnection("Provider = Microsoft.Jet.OLEBD.4.0; Data Source = dbCDNM.mdb")
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Dim s As String
dbCon.Open()
If optAdmin.Checked Then
s = "INSERT INTO Users(Username, Password, Lastname, Firstname, MI, Usertype) VALUES('" & txtUsername.Text & "', '" & txtPassword.Text & "', '" & txtLastname.Text & "', '" & txtFirstname.Text & "', '" & txtMI.Text & "', ' Administrator ')"
Dim dbCommand As New OleDbCommand(s, dbCon)
dbCommand.ExecuteNonQuery()
MessageBox.Show("Record Saved")
ElseIf optLib.Checked Then
s = "INSERT INTO Users(Username, Password, Lastname, Firstname, MI, Usertype) VALUES('" & txtUsername.Text & "', '" & txtPassword.Text & "', '" & txtLastname.Text & "', '" & txtFirstname.Text & "', '" & txtMI.Text & "', ' Librarian ')"
Dim dbCommand As New OleDbCommand(s, dbCon)
dbCommand.ExecuteNonQuery()
MessageBox.Show("Record Saved")
Else
MessageBox.Show("You have to select a user type.")
End If
dbCon.Close()
End Sub
End Class
|
|
|
|
|
Best guess, the Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine. Other possibilities that spring to mind is that the mdb is not in the same folder as your exe, or it needs a username/password, and .NET is giving you a useless error message.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
can you please give me a sample codes regarding backup before logging off or shutting down the computer
|
|
|
|
|
Backup of what ? Your database ? Your source code ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sir,
I'm sorry sir for being not specific to my question. what I mean is files in my computer such as files save in drive d will need to be backup before logging off or shutting the computer
|
|
|
|
|
The only place you can put the launch of a Logoff or Shutdown script is in Group Policy. Click on Start/Run, then type GPEDIT.MSC and hit Enter.
Expand the Computer Configuration item on the left, then Windows Settings. This Scripts item is where the system's Startup and Shutdown scripts run from.
Expanding the User Configuration items, then Windows Settings, is where the User's Logon and Logoff scripts are run from.
You have to launch your code to do the backup from one of these places, depending on your requirements. But, a warning. The scripts only have a limited time to run. By default, it's 10 minutes. If your app doesn't finish it's work in that time, it'll be terminated and an error event logged.
|
|
|
|
|
hi
can anyone help me in generating auto emails after checking the credentials of the user.i am using .net2.0/vb.net/oracle
thank you
|
|
|
|
|
You can definitely use google to search this.
|
|
|
|
|
Would you mind explaining what you mean by "checking the credentials of the user" and how that relates to emails??
|
|
|
|
|
I am confused about the data binding in the vb.net 2005.
I don't know how to use the below properties to bind with the database data and after adding and editing the data save back to the database.
[code]
Public ReadOnly Property CustomerID() As String Implements ICustomer.CustomerID
Get
Return mstrCustomerID
End Get
End Property
Public Property CompanyName() As String Implements ICustomer.CompanyName
Get
Return mstrCompanyName
End Get
Set(ByVal Value As String)
mstrCompanyName = Value
End Set
End Property
[/code]
Is there is any link where I can understand the complete usage of classes and data binding.
Thanks In advance
|
|
|
|
|
You would need to supply the code to read/write the data back to the database. If I understand your implementation (you're leaving out a lot of information!), you would possibly have a Customers collection class that holds these Customer (???) objects. This Customers class would be responsible for iterating over the items in its collection and updating the database with any changes, as well as retrieving customer records from the database and creating new Customer object from it.
This has nothing to do with data binding, which means that controls are bound to a data collection, like a DataTable or some other collection.
Or did I miss the point of the question??
|
|
|
|
|
Did someone say blatant plug?
Diamond Binding[^] will perform that task for you, and also keep those property definitions synchronised with your database with a handy VS addin.
If you want to do it yourself, which is extremely boring, repetative, and likely to break every time you change the database, then there is a quite a few articles on Data Access Layers (DAL) on codeproject. Everyone seems to love doing it the hard way :P
|
|
|
|
|
I am using vb.net 2005 as front end and Oracle 8.0.5 for back end.How I can add oledbdataadapter and configure this to Oracle database.Whenever I tried to configure the oledataadapter and try to select the connection it shows only two data sources in the list
1. Microsoft Access Database File
2. Microsoft SQL Server Database File.
Any Idea how I can configure this to Oracle Database?
Thanks in Advance.
|
|
|
|
|
You shouldn't need to select anything, just enter the connection string in code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
In code I can enter the connection string but what about if I want to bind controls at design time?
|
|
|
|
|
I don't know how to really start this kind of project. I have never tried to manipulate another .exe with vb.net. I would like to click on a place where you could type and have my program type something preset like "Hello, this should be auto typing."
|
|
|
|
|
Hi,
I´d like to create a XML Header like this:
<?xml version="1.0" encoding="utf-8"?>
<XDOMEA xmlns="http://www.xdomea.de" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xdomea.de xdomea_root_1_0.xsd" XDOMEA_Version="1.0">
All I´ve tried gave not that result or ends with an exeption or error.
w.WriteStartDocument()
w.WriteStartElement("XDOMEA")
w.WriteAttributeString("xmlns", "http://www.xdomea.de")
w.WriteAttributeString("xmlns", "xsi", Nothing, "http://www.w3.org/2001/XMLSchema-instance")
w.WriteAttributeString("xsi", "schemaLocation", Nothing, "http://www.xdomea.de xdomea_root_1_0.xsd")
w.WriteAttributeString("XDOMEA_Version", "1.0")
What´s wrong?
Thanks, Daniel
|
|
|
|
|
Hello Daniel,
In regards to your query I would like to mention that you are trying to bind "xmlns" prefix to "xsi" namespace URI, it is not the correct procedure because "xmlns" is a special reserved attribute name and cannot be bound to any namespace URI other than "http://www.w3.org/2000/xmlns/".
w.WriteAttributeString("xsi", "noNamespaceSchemaLocation", "http://www.xdomea.de xdomea_root_1_0.xsd")
I hope this helps.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
I need to read the physical drive sectors and use them can I do that using vb.net or do I have to use VB6.
I don't want to read the logical drive I want to read the physical drive.
i.e.:
010 editor (software) lets u read either the logical drive of a physical drive or the physical drive itself.
thx for ur help.
BiG RaLpH
if you don't have an answer don't answer it will be better.
|
|
|
|
|
You have to use the Win32 API to do this. There are no classes built into the .NET Framework to do it for you. Even if you use VB6, you still have to use the exact same technique.
Google results for "vb.net read disk sectors[^]".
|
|
|
|
|
Hello
I need to split the words in a way that each should be meaning ful. For Example we have word "codeproject" , this consist of two words Code and Project. I want to split the words like this . Another Examples would be
somehow= Some How.
thisis = this is
whatisyourname= what is your name
Any help would be appreciated.
Regards
Rizwan Bashir
Rizwan Bashir
<a href="http://www.alm-soft.com/">ALM Soft</a>[<a href="http://www.alm-soft.com/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
Well you will need a dictionary to start
The you will need to reconstruct the text whilst attempting to match words in the dictionary.
Good luck, you will need it.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|