|
GuyThiebaut wrote: are there any lists or articles on the .Net Framework which illustrate everyday coding issues It's hard to pin down what "everyday coding issues" are. A lot of us will be databinding, in some way; then again, it wouldn't help much to point to INotifyPropertyChanged . A lot of us will be manipulating files; it'd be useless to point to System.IO - a good explanation on Streams is more valuable for someone who has to work with files.
There's some interfaces that are designed for collections (think IList[^] and IEnumerable[^]), there's IClonable to create copies of objects, there's IDisposable to clean up, or implement these interfaces[^] to create your own dataprovider (allowing the use of connection/command objects on your own datastore; I've done it to read the EventLog from a remote PC)
That's just interfaces, but there's more - There's a Object.GetHashcode[^] that returns a unique key for each object. Makes implementing IComparable a bit easier. Overriding ToString is another obvious one; also helps in debugging.
The only thing I can recommend is browsing a lot of programming books (scan the index for anything interesting) and keeping an eye on CodeProjects' articles.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy,
That is helpful and yes scanning the indexes is probably a good way to go.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
hello friends
I have three tables with similer structure and same column name sname,ssno,grade.I want to copy rows from table1 to table2 and table3 based on column grade . I am getting an error
"No value given for one or more required parameters"
can some kindly help me to solve the problem
Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\dtb.accdb")
Dim CmdStr As String
CmdStr = "insert into table2(sname,ssno,grade) select sname,ssno,grade from table1 where grade =B"
CmdStr = "insert into table3(sname,ssno,grade) select sname,ssno,grade from table1 where grade =A"
con.Open()
Dim cmd As OleDbCommand = New OleDbCommand(CmdStr, con)
cmd.ExecuteNonQuery()
con.Close()
MsgBox("Done")
|
|
|
|
|
This is a Database[^] issue, nothing to do with .NET Framework.
Use the best guess
modified 14-Aug-13 6:57am.
|
|
|
|
|
You didn't specify your table structure i.e. how many columns are available in table1,table2 and table3.
The usual reason for this error is a missing or misspelled value.
I think there will be more than one or more columns are available on your all three tables. If there is no any primary key defined on above tables then you can write query as below:
INSERT INTO TABLE2 SELECT * FROM TABLE1 WHERE GRADE = 'B'
GO
INSERT INTO TABLE2 SELECT * FROM TABLE1 WHERE GRADE = 'A'
Another case will be like, your all table structure will be same but some columns have not null attributes may be.
|
|
|
|
|
hi,
i have tried for getting all values from base table as a check boxes and save into Transaction table.
but i try to do one more step ahead,but i couldn't succeed.
scenario:-
1.)base table have 10 records having id, Value as the fields.
2.)I want to create dynamic check boxes and corresponding with Value.
once i added 11 record in base table the check box should come automatically.can any one give me sample code or suggestion to do this.
Thanks in Advance
Kanna
|
|
|
|
|
i had a file.exe and i oppende it with zip7 and ther wase som filse like code and anothers and ther was a folder with name :.rsrc , now i want to rebuild file and cover it to exe file to owrk agin
thank you
|
|
|
|
|
That sounds like it was a self-extracting zip. Go back to the original file and run it, and it should extract the contents into the properly structured set of files and folders.
Use the best guess
|
|
|
|
|
Could you please try to spell your question correctly? I do not understand it.
|
|
|
|
|
i opend exe file by 7zip and i want to re build
|
|
|
|
|
Is it possible to take images through a webcam via a browser through code..??
|
|
|
|
|
|
In simple words YES it is possible. Just google for some libraries or controls/components which can help you just do it for you. There are a lot of free libraries available for it; including libraries written in javascript
|
|
|
|
|
|
I have to give a two hour introductory lesson to a group of C++ and Delphi programmers on EF next week. I'd like some advice on the group of topics I should present and the scope and depth of those topics. This will not be the last lesson, so I can defer a lot of deeper details.
|
|
|
|
|
For starters, there are 2 main focuses when it comes to EF that would make an interesting introductory talk:
1) Code first
2) Database first
Talk about how one can (1) create a model in code and have EF generate the database; and (2) how one can use an existing database to generate a (code) model.
(Of course, the assumption is that SQL Server is the dbms).
|
|
|
|
|
I have a webserver that will be running an ASP.NET application and a WCF service.
The ASP.NET application would require the user to log in before he/she can use the WCF service. I want to handle the sessions so that the user will be logged out automatically after a period of time.
This is where I'm stuck, for the WCF application, I can check that the user is still using the system (i.e. the session gets updated every time the WCF application is called) but for the ASP.NET side, I'm just wondering how can I go about joining these 2 together. Because currently, the ASP.NET application would log the user off since what is happening after login doesn't touch the ASP.NET application which means that the user cannot access the WCF service.
I want to know if I can manually handle the ASP.NET sessions?
Thanks.
|
|
|
|
|
|
You can maintain multiple session to manage it. you can create your own session as well.
Regards
Keyur Satyadev
|
|
|
|
|
mission, I want to ask, fitting I kept running there is a message like this: Data type mismatch in expression critria. Who knows not,? I use an Access database ...
|
|
|
|
|
Without some details of your table and the command you are using it is impossible to guess.
Use the best guess
|
|
|
|
|
the sintaks:
Sub SetText(ByVal text As String)
If TextBox1.InvokeRequired Then
Dim d As SetTextCallback = New SetTextCallback(AddressOf SetText)
Invoke(d, New Object() {text})
Else
TextBox1.Text = text
End If
Try
Dim Nim As String = Nothing
Dim Nama As String = Nothing
Dim Tanggal As String = Nothing
Dim No_Telepon As String = Nothing
Dim Pesan As String = Nothing
Dim Status As String = Nothing
Dim arrString As String()
arrString = Split(text, ";;;")
Pesan = arrString(1)
'Nim = arrString(2)
'Nama = arrString(3)
'Jam = arrString(5)
Call Koneksi()
DML.Connection = Database
DML.CommandType = CommandType.Text
DML.CommandText = "insert into TBlSMSMasuk(Nim, Nama, Tanggal, NO_Telepon, Pesan, Status) Values ('Nim','Nama','Tanggal','NO_Telepon','Pesan','0')"
DML.ExecuteNonQuery()
MsgBox("ada SMS masuk, silakan direfresh")
'Call Atur()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
I am using an Access database
I've likened to a query from database syntax but still there is a message like that, I wonder why?
|
|
|
|
|
You need to check the type of your database fields. This message indicates that the value being sent does not match the type expected by one of the fields in the table you are updating.
Use the best guess
|
|
|
|
|
Well, look: you do not insert "real" values, but the names of the fileds: Values ('Nim','Nama','Tanggal','NO_Telepon','Pesan','0')
And did you really design the Tanggal column to be a varchar column instead of DateTime? And is Status a varchar instead of an int?
Better use a parameterized query, something like
insert into TBlSMSMasuk(Nim, Nama, Tanggal, NO_Telepon, Pesan, Status) Values (@Nim,@Nama,@Tanggal,@NO_Telepon,@Pesan,@Status)
and then add the parameter values like
DML.Parameters.AddWithValue(@Nim, Nim);
etc. (Assuming that DML is an IDbCommand object)
|
|
|
|
|
mean because I am still learning how visual basic.net?
and that adds to the value of the parameter like this:
DML.Parameters.AddWithValue (@ Nim, Nim);
DML.Parameters.AddWithValue (@ Name, Name);
DML.Parameters.AddWithValue (@ Date, Date);
DML.Parameters.AddWithValue (@ NO_Telepon, NO_Telepon);
DML.Parameters.AddWithValue (@ Message, Message);
DML.Parameters.AddWithValue (@ Status, Status);
or like how the detail because I still learn visual basic.net .., please,, thanks,,?
|
|
|
|