|
Well, a password and a username are both strings, so I guess the easiest thing is to create a table with two columns, and make them both strings.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
This is very straightforward. Like Christian said, both username and password would be strings, and stored in the database as text fields in Access. Encrypt the password using an encryption algorithm of your choice, preferably one that isn't crackable like DES...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I have a string strA = "12 MyAddress"
strB = "Your Name"
I want to get the first char of string and want to know weather it is integer between 1-9 or char between A-B.
How can I do that.
seema
|
|
|
|
|
if char.isnumber(stra.chars(0)) = true then
'do something if its a number
else
'do something else
end if
|
|
|
|
|
You have cross posted in three forums! Go to your room! Read the forum guidelines!
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Don't cross post. It is rude and look at the replies you got in the C# forum. Next time, pick one forum, ideally the language you are writing the code in, and stick to it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Good day to you,
I'm just this a basic component for classDataAnalyzer. It's supposed to manage code establishing OleDb (Access) connections in Web Applications. Use this class to access what you need I guess that it'll help you get on your feet. Here's the Question for those if you choose to accept it. I've trying to convert this into code at use on a windows form. I need to be able to use this code, but the configuration manager namespace was developed for use on the Web. I need your help with a proper function for building a function that will manage the configuration string in a WinForm.
Thanks
<br />
Public Class AccessOleDb<br />
'''-----------------------------------------------------------------<br />
''' <summary>Gets the local access database connection string.</summary><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Shared ReadOnly Property ConnectionString() As String<br />
Get<br />
Return ConfigurationManager.ConnectionStrings("ACCESS").ConnectionString<br />
End Get<br />
End Property<br />
'''-----------------------------------------------------------------<br />
''' <summary>Executes a sql query command.</summary><br />
''' <param name="query">Ole command to execute.</param><br />
''' <returns>Returns the number of rows affected.</returns><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Shared Function ExecuteCommand(ByVal query As String) As Integer<br />
Dim oleConn As OleDbConnection = New OleDbConnection(ConnectionString)<br />
'Dim oleConn As New OleDbConnection(ConnectionString)<br />
oleConn.Open()<br />
Dim oleCmd As New OleDbCommand(query, oleConn)<br />
Dim intRows As Integer = oleCmd.ExecuteNonQuery()<br />
oleConn.Close()<br />
oleConn.Dispose()<br />
oleCmd.Dispose()<br />
Return intRows<br />
End Function<br />
'''-----------------------------------------------------------------<br />
''' <summary>Populates a DataSet from the results of the specified query.</summary><br />
''' <param name="query">OleDB query to run against the Access Database.</param><br />
''' <returns>Returns a DataSet with the results of the Access Query..</returns><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Overloads Shared Function PopulateDataSet(ByVal query As String) As DataSet<br />
Dim oleConn As New OleDbConnection(ConnectionString)<br />
oleConn.Open()<br />
Dim oaTemp As New OleDbDataAdapter()<br />
oaTemp.SelectCommand = New OleDbCommand(query, oleConn)<br />
Dim dsTemp As New DataSet()<br />
oaTemp.Fill(dsTemp)<br />
oleConn.Close()<br />
oleConn.Dispose()<br />
oaTemp.Dispose()<br />
Return dsTemp<br />
End Function<br />
End Class
Thanks for your help and best wishes to you.
J
|
|
|
|
|
Jordan Martz wrote: but the configuration manager namespace was developed for use on the Web.
No, it wasn't. It was developed to be used in either environment. It's the configuration file that changes. There's nothing to convert. This code will work fine in a Windows Forms app, so long as you have a properly written app.config file in your project.
|
|
|
|
|
What do I remodel in my application configuration
Do I work on the connections for
<br />
<connectionStrings><addname=<br />
"MyProgram.My.MySettings.NWConnectionString"<br />
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;<br />
Data Source=|DataDirectory|\DataConnections\NW.mdb providerName="System.Data.OleDb" /></connectionStrings><br />
Thanks Dave
|
|
|
|
|
So long as your app.config has a <connectionStrings> section, something like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="MyAccessDBConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=...."
providerName="System.Data.OleDb" />
</connectionStrings>
</configuration>
In your code, the connection string name would be, in this example obviously, MyAccessDBConnectionString .
|
|
|
|
|
hi to all
i had made an application for which no dlls is required and hence it can be runned by just copying the .exe file to the other PC. now when i try to copy the EXE file to network drives and run it from my pc it is running successfully, but when i go to another pc and run the exe file which is in network drive it is throws an error saying
"application encountered a problem,Please tell microsoft about this problem.and two buttons 'send report', 'dont send' "
my intension is to keep the exe file in the common network and distribute the shortcut of that exe files to every one, who wants to use the application.so that updation for the exe file(if occurs) can be done very easily to that exe file in network,and it will be automatically reflects to every one as all are using shortcuts. this is very clearly done by VB 6.0 and it is not able to done by VB.net.For this simple reason our company is avoiding VB.NET.
please do the need full.
Thanks & Regards
Oersla Afroze Ahmed
|
|
|
|
|
Go to MSDN and search for "Code Access Security". Any managed code running from a non-local, i.e.: network share, source is, by default, not trusted. Your application is run in a heavily restricted sandbox that has very limited permissions to system resources. Kind of like trying to your your app in a web brwoser with the securty turned up.
|
|
|
|
|
Hi,
I was wondering if anyone of you would know how to eliminate the SAVE AS dialog box. I need to create a script that will automaticaly save file as MDI (or PDF). The name of the file will be provided as parameter to the script. Any help will be great.
Thanks,
Flavio
|
|
|
|
|
What "Save As" dialog?? What script?? What is this script supposed to do?? You're going to have to supply a lot more information about what you're doing. There isn't enough detail in what you've posted for anyone to help you.
|
|
|
|
|
Hi,
Here is the situation. I have a C++ code that generate reports and send them to the default printer. Now what I would like to do is instead of sending to print I would like to generate the report as either MDI or PDF. As you know, when you try to print to MDI printer it ask you for the name and file location(the standard Windows Save As dialog box). I have hundreds of reports to be created and I dont want to enter the name for each one of them. I would like to automatically save all the reports as MDI. The idea is to create a loop and call the VB scrip within my C++ program passing the file name as parameter.
I hope this helps explan better my situation. If not, feel free to let me know.
Thanks a lot.
Flavio
|
|
|
|
|
Ahh! It's not going to work. There's no way to get rid of the Save As dialog in the print dialog because there is no way to set the filename of the printed document.
|
|
|
|
|
I want to see if it is possible to change a font color of one row of a datagrid given a certain value is in the row. Is this possible? How?
|
|
|
|
|
For the .NET 1.0 and 1.1 DataGrid, see this FAQ[^]. There's a bunch of tidbits on using the DataGrid.
Or were you talking about the DataGridView in .NET 2.0??
|
|
|
|
|
I have developed a database project using sql server2000 and vb.net.now i need to create a setup file like any other readymade software which will create a database and also the program setup file and may run in any computer which have no vb.net or sql server2000. How can i do this?
PLEASE HELP ME....................................
|
|
|
|
|
Using Visual Studio (2005, 2008, maybe 2003):
Short answer (quick):
Build > Publish <project name="">
Long answer (thorough):
Solution Explorer > My Project > Publish (it's a tab) > enter paramaters > Publish now.
If your VS is not recently updated, you will not be able to do this. You must get the newest version (I use SP1).
|
|
|
|
|
|
I am using a Component C1DateEdit. I commonUpDownButtonClick and a CommonValueChanged Handles on all of those controls. After either UpDownButtonClick or CommonValueChanged is executed it calls another routine that figures out which C1DateEdit was the sender if it was datDischargeDate then it calls sAbleDischargeReason().
Private Sub sAbleDischargeReason()
Dim bStatus As Boolean
If IsDBNull(datDischargeDate.Value) And datDischargeDate.Text = String.Empty Then
bStatus = False
Else
bStatus = True
End If
lblDischargeReasonNum.Enabled = bStatus
cboDischargeReasonNum.Enabled = bStatus
End Sub
The problem that I am having is that when it hits the if in sAbleDischargeReason() it is always true because this code is being executed before the value is in either datDischargeDate.Value or datDischargeDate.Text
I am not sure how to make this execute after the value is already there.
Any help is much appreciated.
Thank you
Humble Programmer
|
|
|
|
|
That's going to be a question for Component1's website. That's a functionality issue with their controls. ComponentOne site[^]
|
|
|
|
|
Is there not something I can do with pre or post validation. I have not used them but that seems like it could some how work.
Humble Programmer
|
|
|
|
|
Again, that's exposed entirely by the control in question. Validation could work, but how you have to do it is dictated by whoever wrote the control.
|
|
|
|