|
How can I auto-populate two MS Word document fields (customer name) and (address)
From the Northwind database
Example:
MS Word Document: New customer Information
This is to inform you Mr. _________(customer name) has a new address of _______ (address)
Here is my scenario:
User logs in to web page and updates a record for the customer’s new address, which will be stored in the customers table of the Northwind database. User wants to print the above word document: New Customer Information which will contain the updated data
I have visual studio 2003, and Visual studio tools for office
|
|
|
|
|
hi
i want to know how to crete table through quries in access
i had created table test1 with one field id which is autonumber i had used following code
strSql = "Create Table test1(Id AutoNumber)"
conn.Execute strSql
but it gives error syntax error in field definition
what i want is that id should be primary key and autonumber
ddd
-- modified at 2:08 Wednesday 15th February, 2006
|
|
|
|
|
The autonumber column type in Access is called "INTEGER IDENTITY". Also, you must set the primary key.
Here's an example:
strSql = "CREATE TABLE test1 (" & _
"id INTEGER IDENTITY NOT NULL, " & _
"CONSTRAINT PrimaryKey PRIMARY KEY (id))"
conn.Execute strSql, , adCmdText + adExecuteNoRecords
|
|
|
|
|
|
Hi, I am using VB.NET 2003/MS Access. I am getting data from a table into a particular datatable in a dataset. say the data fields are ID, Name, Period and Address. I want to obtain a record from the table for a particular period and ID. How can this be done using a select statement?
With Best Regards,
Mayur
|
|
|
|
|
SELECT * FROM TableName WHERE [ID]=@ID AND Period=@Period
!alien!
|
|
|
|
|
Thnx for your reply. Can you please provide some additional steps as to how I can get the values obtained by the select statement into different variables. I am a fresher in .Net.
how do you write the select statement for selecting records from datatable.
your select statement -
SELECT * FROM tablename WHERE [ID]=@ID AND Period=@Period
how do we replace tablename with dataset.tables(0)?
With Best Regards,
Mayur
-- modified at 0:46 Wednesday 15th February, 2006
|
|
|
|
|
This is example.
Private Sub FillDataGrid()
Dim strId As String = "" 'Set Id
Dim strPeriod As String = "" 'Set Period
Dim tableName As String = "" 'Set tableName
Dim connstring As String = "" 'Set ConnectionString
Dim selectSQL As String = "SELECT * FROM " + tableName + " WHERE [ID]='" + strId + "' AND Period='" + strPeriod + "'"
Dim conn As New OleDb.OleDbConnection(connstring)
Dim cmd As New OleDb.OleDbCommand(selectSQL, conn)
Dim ds As New DataSet
Dim da As New OleDb.OleDbDataAdapter(cmd)
Try
conn.Open()
da.Fill(ds)
DataGrid1.DataSource = ds.Tables(0)
Catch ex As Exception
MessageBox.Show(ex.Message, ex.Source)
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
end if
conn.Dispose()
cmd.Dispose()
End Try
End Sub
!alien!
|
|
|
|
|
I believe Mayur was asking about how to select data from Data Table not from Database Table.
I was about to ask the same question.
My case is like this.
myDataTable = PopulateDataTableFromAnyTable()<br />
<br />
for each row in myDataTable <br />
<br />
Update DatabaseTable where FieldA = row.item(0) and FieldB = row.item(1)<br />
<br />
end for
If I directly update "DatabaseTable" for each iteration, it will be really slow.
So I was thinking to populate "DatabaseTable" to a Data Table, do the update in Data Table and then send the changes back to Database.
The problem is how to search data in data table with one or more criteria.
Thank you
WiL
|
|
|
|
|
Hey guys,
I have found the solution, I guess. Please refer to the link below.
http://www.c-sharpcorner.com/Code/2004/March/DataSetsIn.NETP2.asp[^]
Ofcourse, i have the same query as shiroamachi. how do you insert or update data into a datatable and finally update the database with the datatable. if anyone has any idea regarding this, plz let us know.
With Best Regards,
Mayur
-- modified at 4:07 Wednesday 15th February, 2006
|
|
|
|
|
Hi,
I want to use fax service extended com api with VB.NET and did the following:
I am using faxcomex.dll for fax server connection and etc.
Public Class frmSendFax
Inherits System.Windows.Forms.Form
Public WithEvents objFaxServer As New FAXCOMEXLib.FaxServer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
'Connect to the fax server
objFaxServer.Connect("")
objFaxServer.ListenToServerEvents(FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL
+ FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
End Sub
Private Sub objFaxServer_OnIncomingJobAdded(ByVal objFaxServer As FAXCOMEXLib.IFaxServer,
ByVal jobid As String) Handles objFaxServer_OnIncomingJobAdded
Dim objFaxIncomingQueue As FAXCOMEXLib.FaxIncomingQueue
Dim objFaxIncomingJob As FAXCOMEXLib.FaxIncomingJob
Dim strCallerID As String
objFaxIncomingJob = objFaxIncomingQueue.GetJob(jobid)
strCallerID = objFaxIncomingJob.CallerId()
MsgBox(strCallerID)
End Sub
But how can I get the event called as it not happening in VB.NET???
I hope anybody can help me.
Thanks
Prasananjit Dash
|
|
|
|
|
At a glance, I can see one mistake:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL + _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
Should be:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL Or _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
Adding values together will cause bits to be set/reset where they shouldn't because of mathmatical carry's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:46 Wednesday 15th February, 2006
|
|
|
|
|
Hi,
Is there a way to draw a picture on the titlebar
Please, help me
Thank you,
chatura
|
|
|
|
|
|
Thanks
chatura
|
|
|
|
|
Hello all!
Can anybody tell me how I can go about to synchronize the data between PXE servers using vb.net.
Thanks
|
|
|
|
|
PXE servers?
There's a ton of companies out there putting out their own implementations for PXE servers, so exactly what you'd have to do would be specific to the server your using. But I would imagine that you'd have to copy files between the file servers that are hosting the PXE server's data and images. There's no standard for storing this stuff so you'd have to do some homework on your servers to figure out what you would have to copy over and where to get at that data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello Dave
Thanks for your reply! I am actually on internship and my company asked me to write a vb.net program to synchronize to a central server. I am totally clueless about it...with nobody to really guide me... Basically there are 3 servers, 1 running on server 2003 and the other 2 on NT4. Correct me if I am wrong. I have to upgrade the other 2 stations to server 2003 before I can test my synchro program? Can I use msmq to synchronise the server? How do I send and receive messages using msmq? Pardon me if my questions sounds dumb. Thanks!
|
|
|
|
|
The base server doesn't really matter, so long as all three servers are running the same PXE Server software. If not, you'll have to make that happen. If the PXE server software requires 2003 to run, then yes, you'll have to upgrade those base servers to 2003. Get it?
After that, it's just a matter of managing an inventory of files on all three servers and copying the last updated version to the other two.
Can you use MSMQ? I wouldn't recommend it. Do you really need to add that level of compexity to get this job done?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Need help on where to download a free full version Flex Cell 2.0 .net framework... pls help badly needed... links are highly appreciated......
:->
|
|
|
|
|
You asked this before. There answer is not going to change. And quit spamming a bunch of forums with the same question. It's very rude.
http://www.grid2000.com/[^] is the only place you're going to get this from and it's only the trial version that's free.
THERE IS NO FREE "FULL VERSION" AVAILABLE THAT IS LEGAL! If you want pirated versions of controls, you've come to the wrong place to ask where to get them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, out of the 18 posts you have on CP, 1/3rd of them have asked this very question. And you specifically asked for the "full version", for which there is no free legal download. If all you wanted was the free trial version, a simple Google search for "Flex Cell 2.0" would have given you the answer in under 10 seconds.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I am having a problems in regards with date formats... pls help me, on how to display the day of the week as .....
example: if the date is "2/15/2006, Wednesday" ...
the word "Wednesday" will be the only one displayed in vb2005.net windows form..... tnx and more power
|
|
|
|
|
Try this...
Date.Now.DayOfWeek.ToString()
|
|
|
|
|
You can use
Now.DayOfWeek.ToString
'OR
Now.ToString("dddd")
!alien!
|
|
|
|