|
Thank you very muc h.
|
|
|
|
|
I need a store proc to convert text file to SQL2000 table using delimeter "|"
Rekha
|
|
|
|
|
awara wrote: I need a store proc to convert text file to SQL2000 table using delimeter "|"
Well congratulations on that. I need a donut - the difference is, somebody is just about to get me one.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Try the "BULK INSERT" SQL command with the "FIELDTERMINATOR" option.
|
|
|
|
|
1) Create the table.
2) Use the Bulk Insert sql statement. You can find the syntax and paramaters in BOL.
Jeff
|
|
|
|
|
Hi,
I was wondering if someone could point me in the right direction for the following problem:
I created a SQL database which includes a payment system to process customer payments, when defining the Table which will hold the Payments from customers, I couldn't decide if i should create a table for Payment Types (cash, credit card, checking etc...) and add a relationship for each customer payment to the Payment Type table, or use a set of predefined characters to identify payment types (S=cash, C=credit card, H=checking etc...)
A payment type table is definitely more in compliance with the relational database modal, but on the other hand, since i will at most only have 4 or 5 payment types it will offer much better performance since there is no joins and PK/FK constraints and it will save space as well.
|
|
|
|
|
Yet at you end up having a performance overhead when you end up having to convert the payment type back. Plus, what happens if you add a payment type? Add a row and get the functionality for free, or change a hunk of code to handle the new Quarterly Cash payment type that your customer wants?
Stick with the normalised version - the overhead of the fk isn't that great.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You have a very good point about the performance (although its not in the db its in the app which is generally cheaper)
The problem of adding a new payment type hit me as well. Initially i decided i can save a list of payment types in a configuration file and add the new one there, i figured its not that often that i will be adding a new payment type anyway. But why reinvent the wheel when i can have that list saved in the db itself.
Thanks for the reply
|
|
|
|
|
Yona Low wrote: But why reinvent the wheel when i can have that list saved in the db itself.
Lovely jubbly. You know it makes sense.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all.
I create Stored Procedure and in my procedure I coll other porcedures, but I get error message wen I try to "check syntax".
Ex:
<br />
CREATE PROCEDURE TEST_1<br />
as<br />
TEST_2 <br />
can help?
|
|
|
|
|
If yout want to call a other stored procedures use the keyword "execute"
CREATE PROCEDURE TEST_1
as
execute TEST_2
gILBERT
|
|
|
|
|
|
Hi Everyone:
I’m still struggling with the BindingNavigator control in Visual Studio 2005.
What I want to do is create a DataSet and populate it with data retrieved from a specific database table using a stored procedure. The code to accomplish this part is shown below.
'Connect to the database
Dim cn As SqlConnection = New SqlConnection()
cn.ConnectionString = My.Settings.DBConnectionString
'Retrieve the data using a stored procedure
Dim cd As New SqlCommand("mrmsp_ListBinding", cn)
'Declare the SQLDataAdapter and DataSet
Dim MySqlDataAdapter As New System.Data.SqlClient.SqlDataAdapter()
Dim MyDataSet As New System.Data.DataSet
'Set the database connection for MySqlDataAdapter
MySqlDataAdapter.SelectCommand = cd
'Fill the DataSet
MySqlDataAdapter.Fill(MyDataSet)
Now I need to set the BindingNavigator's DataSource to the DataSet we created as shown below.
'Set the BindingNavigator's DataSource to the DataSet we created.
naviBindings.BindingSource.DataSource = MyDataSet
This is where I’m running into trouble. I have a form that contains four text boxes. I want to bind each of these text boxes to a different field from the DataSet I created. A simple example would be:
TextBox1 = DataSet.Field1.Value
So First Question: How do I bind specific database fields from a DataSet to a specifc control on the form using VB.NET code?
Thanks,
Quecumber256
|
|
|
|
|
TextBox1.Text = DataSet.Tables[0].Rows[rowno][columnno].ToString()
Gautham
|
|
|
|
|
hello,
I want to use row and column in winform, it fill by user at runtime and save to database...:laugh
|
|
|
|
|
|
what is the solution to the timeout problem while filling some dataset using sqldataadapter.When the query tested in query analyzer generates result set after considerable time duration (like 20 seconds) .while the application doesnt stay for that long thus leaving the dataset empty .I also changed timeout value in web.config but it didnt work .
Madni
|
|
|
|
|
give a snapshot of your code
|
|
|
|
|
Hi.
What model should I use to handle both named and unnamed parameters depending on the type of db engine my program connects to?
|
|
|
|
|
The Enterprise Library (downloadable from Microsoft's website) allows you to create parameters independent of whether they are named or not (or even if the naming convention is different)
|
|
|
|
|
Thanks. I'll check that out.
|
|
|
|
|
I am using SQL Server 2000. I need get location of a specific character. How can I do this in SQL Server ? Indexof function is there ?
My string will be '522-hhdsh-' I need to find '-' position in one query.
|
|
|
|
|
use charindex e.g
SELECT charindex('-','522-hhdsh-')
|
|
|
|
|
Thanks. That worked
|
|
|
|
|
How to store an Audio file in SQL Server 2000
Thanks
|
|
|
|