|
|
vb.net
URGENT!
i am loading data from an access-database like this:
<br />
dim MyConnection As String = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=MyDatabase.mdb;"<br />
dim connStr As String = "SELECT * FROM table1"<br />
dim odc As OleDbConnection= New OleDbConnection(MyConnection )<br />
dim oda As OleDbDataAdapter= New OleDbDataAdapter(connStr, odc)<br />
dim odb As OleDbCommandBuilder= New OleDbCommandBuilder(oda)<br />
dim dat As DataTable= New DataTable("MyDatatable")<br />
dim bmb As BindingManagerBase<br />
<br />
odc.Open()<br />
oda.Fill(dat)<br />
odc.Close()<br />
<br />
bmb = Me.BindingContext(dat)<br />
datagrid1.DataSource = dat<br />
now i want to use a password-protected database. where do i have to insert the password in the example above? (i know that i shouldn't write the password into my code, but the file doesn't contain critical data. i just want to prevent, that user's messing up the file)
and please, i need a solution for this example, not another way of connecting to the mdb-file, since i don't want to rewrite half of my project.
thanks.
|
|
|
|
|
Hello
In your connection string:
dim MyConnection As String = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=MyDatabase.mdb;persist Security Info=False;Jet OLEDB:Database Password=sysadm"
Where sysadm is your password.
Tip: Don´t use that password
Regards
|
|
|
|
|
thanks for the quick answer.
|
|
|
|
|
i have Arabic fields in my DB (i am using a firebird DB).how can i retrieve them using Vb.net , because i m getting them in unknown characters (like this ???@?^??), could someone please help me to find a solution to this problem
Regards
Ramy
|
|
|
|
|
hi. please help me. I have created 1 windows application and now i want to create setup for that how can i do in 2003. i want to create setup file and also it should check prerequirements like dotnet framework sqlserver or any other informations. It should also create tables in database using sql file. can anybody tell me how to add .net framework and sql file to setup project so it will automatically check, install framework and create tables in database in vs.net 2003. please help me...... Thanks.
KIRTI
|
|
|
|
|
as far as the database(sql serve is concerned). u need to export the database file manually to the client end.
framework is the dependency so just add it to ur deployment project.
hope this will help u.
|
|
|
|
|
|
I have a window application from which i need to transfer documents to my server.
Now the easy way is to make a shared folder on server and provide access on it and then copy the file there
or
make an FTP program
But since it will be used only in intranet and only by us so there is no need for FTP.
Is there a way i move file from a system to server like web uploads.
|
|
|
|
|
nitin_ion wrote: Is there a way i move file from a system to server like web uploads.
Only if you have a server that exposes such functionality. If you're sure this will only be used internal to your network, then you just create a Share on the server and use the standard File Copy routines to do whatever you need to.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi
How to capture windows shutdown event in vb.net
Thanks in advance
|
|
|
|
|
System.Diagnostics.Process.Start("shutdown", "-s")
hope this will help u.
|
|
|
|
|
The closest you're going to get in the .NET class library is the SystemEvents[^] class. It exposes a SessionEnding event that you can use to detect when a user logs off or tries to shutdown the system.
Check the documentation for SessionEnding[^] for some other information you'll need to know about this event and what's happening in the system and with your application at the time this event fires.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi all,
how to know that how many file and what is the name of file in the directory that our specified in vb .net 2005??
anyone can help me??
|
|
|
|
|
My.Computer.FileSystem.GetFiles("c:\temp\").Count
My.Computer.FileSystem.GetFiles("c:\temp\") returns a collection of names of the files within specified directory.
|
|
|
|
|
thanks.. your code is very help me...
|
|
|
|
|
how i can get asycnh class
|
|
|
|
|
Goodness knows what you're talking about. Perhaps consider what you're asking, type it into google first, and if that doesn't help, try asking lucidly here.
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 )
|
|
|
|
|
is it concerned with asynchonous.
can u please explain a little bit more precisely.
|
|
|
|
|
Theres thousands of things you can do asynchronously. Perhaps a slightly more specific question would be in order.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Can any one give me a code for RichTextBox that can dispaly many color like visual studio
................
|
|
|
|
|
There's no way that VS is using a rich text box, it would be using a custom class.
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 )
|
|
|
|
|
Project "Test Bank System"
i have 4 radiobutton in test section.i want save value went user selected and click button "Next"
if you have Example code for "Test bank system" and you postRaply that code.
Thank you...
|
|
|
|
|
This question reeks of homework. Noone is going to write your code for you. Everything you need to know about Radiobuttons should have already been covered in class. If youi haven't been paying attention, you've got some catching up to do!
You might want to look into the Checked property.
RadioButton class[^]
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi there,
can i write some code on the form minimize button , I am using vb.net 2005
|
|
|
|