|
Open management studio, right click on the server and properties. Then under security you can change it to mixed mode.
|
|
|
|
|
In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
In the SQL Server Management Studio dialog box, click OK, to acknowledge the need to restart SQL Server.
Make sure you restart the server. and remember "If Windows Authentication mode is selected during installation, the sa login is disabled. If you later change authentication mode to SQL Server and Windows Authentication mode, the sa login remains disabled. To enable the sa login, use the ALTER LOGIN statement."
Cheers
Ghazi
/*
Ghazi Hadi Al Wadi, PMP, ASQ SSGB, DBA
*/
|
|
|
|
|
HI
My Aim is to get the column names of a access database table and store it to a
combobox using C#.net if any one knows the query or any clue please let me know
regards
sindhu tiwari
INNOVATIVE
|
|
|
|
|
string connectionString;
OleDbConnection connection = new OleDbConnection();
OleDbDataAdapter dataAdapter;
DataSet dataSet = new DataSet();
public Form1()
{
InitializeComponent();
}
public void openConnection()
{
try
{
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\Test.mdb";
connection.ConnectionString = connectionString;
connection.Open();
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
public void closeConnection()
{
try
{
if (connection.State != 0)
{
connection.Close();
}
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
public void fillDataset(string query, DataSet dataSet)
{
openConnection();
dataAdapter = new OleDbDataAdapter(query, connection);
dataAdapter.Fill(dataSet, "ColumnNames");
closeConnection();
}
public void fillComboBox()
{
string strQuery = "Select * From Table1";
fillDataset(strQuery, dataSet);
foreach (DataColumn dataColumn in dataSet.Tables[0].Columns)
{
cmbColumnNames.Items.Add(dataColumn.ColumnName);
}
}
private void Form1_Load(object sender, EventArgs e)
{
fillComboBox();
}
|
|
|
|
|
Why have you posted this question? The link I sent you in response to your previous question also explained how to get a list of fields for an Access table.
You should learn to search Google for answers to your questions before posting. Otherwise it looks like you can't be bothered to search for a solution to your problem yourself.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
you can use the following query in your code ...
SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'name_of_the_table'
Mitesh Darji
|
|
|
|
|
hi,
My aim is to get the table names through query ,,database is ms access
if any one knows code for getting the table names please let me know
regards
sindhu tiwari
its me sid
|
|
|
|
|
Look what happened when I tried searching Google[^] for an answer.
Did you try to do this?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thank u very Much..................
sindhu tiwari
its me sid
|
|
|
|
|
string connectionString;
OleDbConnection connection = new OleDbConnection();
OleDbDataAdapter dataAdapter;
DataTable schemaTable = new DataTable();
public Form1()
{
InitializeComponent();
}
public void openConnection()
{
try
{
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\Test.mdb";
connection.ConnectionString = connectionString;
connection.Open();
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
public void closeConnection()
{
try
{
if (connection.State != 0)
{
connection.Close();
}
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
public void getTables()
{
openConnection();
schemaTable = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
closeConnection();
}
public void fillComboBox()
{
getTables();
for (int i = 0; i < schemaTable.Rows.Count; i++ )
{
cmbColumnNames.Items.Add(schemaTable.Rows[i]["Table_Name"].ToString());
}
}
private void Form1_Load(object sender, EventArgs e)
{
fillComboBox();
}
|
|
|
|
|
how to truncate a sql server link table from access.
what i thought access does not support truncate table statement.
if it is so, is there any other alternative through pass through queries?
|
|
|
|
|
nicetohaveyou wrote: what i thought access does not support truncate table statement.
Correct.
nicetohaveyou wrote: if it is so, is there any other alternative through pass through queries?
Use a TRUNCATE TABLE statement.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
how to find the last updated row in a table
ganeshRV
|
|
|
|
|
As per my knowledge you can not.
You have to take one column for datetime to set system datetime and you can easily find out last updated record.
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
How to call one user control from another in DotNet Nuke?
sandip chandra
|
|
|
|
|
sandipchandra17@gmail.com wrote: How to call one user control from another in DotNet Nuke?
Aren't they providing developer support?
Regards - J O H N -
|
|
|
|
|
Don't cross post. You asked this same question in another forum.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How to integrate a asp.net website in dot net nuke?
sandip chandra
|
|
|
|
|
sandipchandra17@gmail.com wrote: How to integrate a asp.net website in dot net nuke?
Is this question anyway related to SQL? Am I missing something?
Regards - J O H N -
|
|
|
|
|
Don't cross post. You asked this same question in another forum. It is rude.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I am using sql server as my database i want to connect it thr internet so dat i can acess it from any wear, i?
i am getting an error like dis
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
plz any one help
|
|
|
|
|
"
You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:
1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
Note Click OK when you receive the following message:
Changes to Connection Settings will not take effect until you restart the Database Engine service.
4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service
"
See http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277[^]
/*
Ghazi Hadi Al Wadi, PMP, ASQ SSGB, DBA
*/
|
|
|
|
|
cm pandian wrote: When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.
That tells it all. You need to configure it to allow remote connections.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Instead of parsing through a string path representing a directory and a file name in order to only record the directory name, I decided to use the Common Dialog known as FileDialog. However, I am not certain how to retrieve the results from the File Dialog. Here is what I have so far:
Set dlgSaveAs = Application.FileDialog(msoFileDialogFolderPicker)
dlgSaveDirectory.Show
txtOutputFilePath.SetFocus
txtOutputFilePath.Text = dlgSaveDirectory.Item
For some reason, I do not get the dropdown list indicating a value for the dlgSaveDirectory. Why can't I see the drop down list? The value that I get on the last line is: "FileDialog(msoFileDialogFolderPicker)" which is assigned to the txtOutputFilePath.Text.
-- modified at 13:36 Friday 2nd November, 2007
|
|
|
|
|
You've asked your question in the wrong forum. This forum is for SQL/database related questions.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|